 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
lsg Guest
|
Posted: Sat Apr 09, 2005 2:45 am Post subject: Error when insert data into AS400 database |
|
|
Hi,
I need your to assist me to solve the problem.
The problem is when i run the ExecSQL, it prompts me "cwbDB_PrepareDescribe returned error code 6036"
"Server error class 1 code -104". But the data can save into the AS400 table.
i am using TSQLConnection to connect to the AS400 database. Libraryname=dbexpca400.dll
vendorlib=cwbdb.dll
the code:
AS400Query1.SQL.Text:='¹insert into '+tmstbl+' (UPWS01) values('+un+')';
AS400Query1.ExecSQL;
Thanks in advance
lsg
|
|
| Back to top |
|
 |
Peter Sawatzki Guest
|
Posted: Mon Apr 11, 2005 10:02 am Post subject: Re: Error when insert data into AS400 database |
|
|
In article <425733bf$1 (AT) newsgroups (DOT) borland.com>, [email]sgling07 (AT) yahoo (DOT) com[/email]
says...
| Quote: |
Hi,
I need your to assist me to solve the problem.
The problem is when i run the ExecSQL, it prompts me "cwbDB_PrepareDescribe returned error code 6036"
"Server error class 1 code -104". But the data can save into the AS400 table.
i am using TSQLConnection to connect to the AS400 database. Libraryname=dbexpca400.dll
vendorlib=cwbdb.dll
the code:
AS400Query1.SQL.Text:='¹insert into '+tmstbl+' (UPWS01) values('+un+')';
|
please show me the value of AS400Query1.SQL.Text at this point.
| Quote: | AS400Query1.ExecSQL;
|
Peter
|
|
| Back to top |
|
 |
lsg Guest
|
Posted: Tue Apr 12, 2005 5:17 pm Post subject: Re: Error when insert data into AS400 database |
|
|
Hi,
The value is tmstbl = TMSLIB.TRUPLPF and
un = 01
un is a string character with 2 digits.
the size of UPWS01 is 2 digits as well.
Thanks Peter.
lsg
Peter Sawatzki <Peter (AT) Sawatzki (DOT) de> wrote:
| Quote: | In article <425733bf$1 (AT) newsgroups (DOT) borland.com>, [email]sgling07 (AT) yahoo (DOT) com[/email]=20
says...
=20
Hi,
I need your to assist me to solve the problem.=20
The problem is when i run the ExecSQL, it prompts me "cwbDB_PrepareDescri=
be returned error code 6036"
"Server error class 1 code -104". But the data can save into the AS400 ta=
ble.
=20
i am using TSQLConnection to connect to the AS400 database. Libraryname=
=3Ddbexpca400.dll
vendorlib=3Dcwbdb.dll
=20
the code:
AS400Query1.SQL.Text:=3D'=B9insert into '+tmstbl+' (UPWS01) values('+un+'=
)';=20
please show me the value of AS400Query1.SQL.Text at this point.
AS400Query1.ExecSQL;
=20
Peter
|
|
|
| Back to top |
|
 |
Peter Sawatzki Guest
|
Posted: Thu Apr 14, 2005 12:21 pm Post subject: Re: Error when insert data into AS400 database |
|
|
lsg,
then your query is wrong which is why I asked you to show me the
contents of AS400Query1.SQL.Text. You showed me the contents of tmstbl
and un. Assuming the values you showed me, I think the value of SQL.Text
becomes
insert into TMSLIB.TRULPF (UPWS01) values(01)
and because UPWS01 is a character field, you may only insert character
values. Modify the query to this and it should work
insert into TMSLIB.TRULPF (UPWS01) values('01')
or modify your Delphi code like this:
AS400Query1.SQL.Text:=
'insert into '+tmstbl+' (UPWS01) values('''+un+''');
Peter
In article <425bf48a$1 (AT) newsgroups (DOT) borland.com>, [email]sgling07 (AT) yahoo (DOT) com[/email]
says...
| Quote: |
Hi,
The value is tmstbl = TMSLIB.TRUPLPF and
un = 01
un is a string character with 2 digits.
the size of UPWS01 is 2 digits as well.
Thanks Peter.
lsg
Peter Sawatzki <Peter (AT) Sawatzki (DOT) de> wrote:
In article <425733bf$1 (AT) newsgroups (DOT) borland.com>, [email]sgling07 (AT) yahoo (DOT) com[/email]=20
says...
=20
Hi,
I need your to assist me to solve the problem.=20
The problem is when i run the ExecSQL, it prompts me "cwbDB_PrepareDescri=
be returned error code 6036"
"Server error class 1 code -104". But the data can save into the AS400 ta=
ble.
=20
i am using TSQLConnection to connect to the AS400 database. Libraryname=
=3Ddbexpca400.dll
vendorlib=3Dcwbdb.dll
=20
the code:
AS400Query1.SQL.Text:=3D'=B9insert into '+tmstbl+' (UPWS01) values('+un+'=
)';=20
please show me the value of AS400Query1.SQL.Text at this point.
AS400Query1.ExecSQL;
=20
Peter
|
|
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group .
|