|
|
Choosing A Webhost: |
MaxDB fetch into problem with concatenated data in oracle mode with embedde: msg#00256db.maxdb
Dear Reader, Within my C/C++ program y tried to do get some concatenated data output within a cursor by using the next query: exec sql declare Cursor_Ocupaciones cursor for select rpad(to_char(cod_programa),10,' ') || rpad(rtrim(tabla,' '),20) || rpad(to_char(orden),10,' ') from guf_ocupaciones; The columns "cod_programa" and "orden" are defined as number(10). The column "tabla" is defined as varchar2(100). The output of the fetch is send to the host variable "query_out", defined as char[1000], and initialised before each fetch with nulls. The first problem consists that after de obtained concatenated data, the rest of the output buffer (query_out) is filled up to de end with blanks, and de last charter +1 (out of the buffer size) with the "@" character. I think the output buffer should contain only the obtained data ended with a null character. The second problem is that if I try to do the same with dinamic SQL (prepare, declare, open and fetch), first the open fails (-2010), indicating that the size indicated in the "rtrim" function on the column "tabla" should be at least de real column size. When I put the size at 100 (real column size), the program executions end in a core dump. The same query tested in the sql client (websql and sqlcli) seems to works fine. Best regards Elbertus Lochtenberg Project Manager Teleserver S.A. Mobile: +34628270643
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | MaxDB fetch into problem with concatenated data in oracle mode with embedded SQL statment in C/C++ programs (correction), Elbertus Lochtenberg |
|---|---|
| Next by Date: | RE: MaxDB fetch into problem with concatenated data in oracle mode with embedded SQL statment in C/C++ programs (correction), Simenec, Thomas |
| Previous by Thread: | OPTIM_CACHE and implications?, Holger Schurig |
| Next by Thread: | AW: MaxDB fetch into problem with concatenated data in oracle mode with embedded SQL statment in C/C++ programs, Zabach, Elke |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|