BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pb setting Bind variables

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
dominique
Guest





PostPosted: Wed Feb 11, 2004 8:47 am    Post subject: Pb setting Bind variables Reply with quote




Problem in setting bind variable with borland cpp and oracle 9.2

case #1:

TQuery *qy=NewQuery(Application);
qy->SQL->Text=" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=:prmEmpNum ");
qy->ParamByName("prmEmpNum")->AsString=aEmployeeNum;
qy->Open();

the result of this query is the same as this one : Select use_employee_num From t_user where use_employee_num=' '
The bind variable prmEmpNum seems not to be set.


Case #2
TQuery *qy=NewQuery(Application);
qy->SQL->Text=" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num='" + aEmployeeNum + "' ");
qy->Open();

the result of this query is the result of : Select use_employee_num From t_user where use_employee_num='aEmployeeNum'
and aEmployeeNum is not an empty string

does anyone know why there is difference in the result between these 2 queries and why the bind variable seems not to be set ?

Thanks in advance
Back to top
dominique
Guest





PostPosted: Wed Feb 11, 2004 11:50 am    Post subject: Re: Pb setting Bind variables Reply with quote




Hello Jayme,

Yes I run with Debug.
aEmployeeNum is an AnsiString and its value is a valid employee num.
I execute the syntax #1 with Informix and there is no pb but with oracle there is no result.
Do you think I have to declare the bind variable before ?

Thanks for your advice regarding ODAC, I will try it as soon as I can..

Dominique


"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Quote:
Hello,

Did you run the application with debug ? What is the type of =
"aEmployeeNum" ? What is the value of "aEmployeeNum" ?=20

You should try ODAC components (http://crlab.com/odac/) , they are very =
good and cheap !=20

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =
news:4029ec18$1 (AT) newsgroups (DOT) borland.com...
=20
Problem in setting bind variable with borland cpp and oracle 9.2
=20
case #1:
=20
TQuery *qy=3DNewQuery(Application);
qy->SQL->Text=3D" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=3D:prmEmpNum ");
qy->ParamByName("prmEmpNum")->AsString=3DaEmployeeNum;
qy->Open();
=20
the result of this query is the same as this one : Select =
use_employee_num From t_user where use_employee_num=3D' '
The bind variable prmEmpNum seems not to be set.
=20
=20
Case #2=20
TQuery *qy=3DNewQuery(Application);
qy->SQL->Text=3D" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=3D'" + aEmployeeNum + "' ");
qy->Open();
=20
the result of this query is the result of : Select use_employee_num =
From t_user where use_employee_num=3D'aEmployeeNum'=20
and aEmployeeNum is not an empty string
=20
does anyone know why there is difference in the result between these 2 =
queries and why the bind variable seems not to be set ?
=20
Thanks in advance



Back to top
Jayme Jeffman Filho
Guest





PostPosted: Wed Feb 11, 2004 12:26 pm    Post subject: Re: Pb setting Bind variables Reply with quote



Hello,

Did you run the application with debug ? What is the type of "aEmployeeNum" ? What is the value of "aEmployeeNum" ?

You should try ODAC components (http://crlab.com/odac/) , they are very good and cheap !

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote

Quote:

Problem in setting bind variable with borland cpp and oracle 9.2

case #1:

TQuery *qy=NewQuery(Application);
qy->SQL->Text=" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=:prmEmpNum ");
qy->ParamByName("prmEmpNum")->AsString=aEmployeeNum;
qy->Open();

the result of this query is the same as this one : Select use_employee_num From t_user where use_employee_num=' '
The bind variable prmEmpNum seems not to be set.


Case #2
TQuery *qy=NewQuery(Application);
qy->SQL->Text=" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num='" + aEmployeeNum + "' ");
qy->Open();

the result of this query is the result of : Select use_employee_num From t_user where use_employee_num='aEmployeeNum'
and aEmployeeNum is not an empty string

does anyone know why there is difference in the result between these 2 queries and why the bind variable seems not to be set ?

Thanks in advance


Back to top
Jayme Jeffman Filho
Guest





PostPosted: Wed Feb 11, 2004 1:39 pm    Post subject: Re: Pb setting Bind variables Reply with quote

Hello,

I think you can try set the ParamType and DataType of the parameter and call the Prepare() method before doing that. So insert the line "if(!qy->Prepared) qy->Prepare();" after the "where" clause and before execute the query.

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote

Quote:

Hello Jayme,

Yes I run with Debug.
aEmployeeNum is an AnsiString and its value is a valid employee num.
I execute the syntax #1 with Informix and there is no pb but with oracle there is no result.
Do you think I have to declare the bind variable before ?

Thanks for your advice regarding ODAC, I will try it as soon as I can..

Dominique


"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Hello,

Did you run the application with debug ? What is the type of =
"aEmployeeNum" ? What is the value of "aEmployeeNum" ?=20

You should try ODAC components (http://crlab.com/odac/) , they are very =
good and cheap !=20

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =
news:4029ec18$1 (AT) newsgroups (DOT) borland.com...
=20
Problem in setting bind variable with borland cpp and oracle 9.2
=20
case #1:
=20
TQuery *qy=3DNewQuery(Application);
qy->SQL->Text=3D" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=3D:prmEmpNum ");
qy->ParamByName("prmEmpNum")->AsString=3DaEmployeeNum;
qy->Open();
=20
the result of this query is the same as this one : Select =
use_employee_num From t_user where use_employee_num=3D' '
The bind variable prmEmpNum seems not to be set.
=20
=20
Case #2=20
TQuery *qy=3DNewQuery(Application);
qy->SQL->Text=3D" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=3D'" + aEmployeeNum + "' ");
qy->Open();
=20
the result of this query is the result of : Select use_employee_num =
From t_user where use_employee_num=3D'aEmployeeNum'=20
and aEmployeeNum is not an empty string
=20
does anyone know why there is difference in the result between these 2 =
queries and why the bind variable seems not to be set ?
=20
Thanks in advance




Back to top
dominique
Guest





PostPosted: Wed Feb 11, 2004 6:31 pm    Post subject: Re: Pb setting Bind variables Reply with quote

Hello,

I tried this code but it's still not working, an idea ?

TQuery *qy=NewQuery(Application);
TParam *prm = NULL;
if ( qy ){
try{
prm = qy->Params->CreateParam(ftString, "use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num = :use_employee_num ");
qy->ParamByName("use_employee_num")->AsString = "toto";
//paramstring help me to debug
AnsiString paramstring = qy->ParamByName("use_employee_num")->AsString;
if(!qy->Prepared) qy->Prepare();
qy->Open();

And there is still no result... but if i replace the where clause with ..."WHERE use_employee_num='" + toto +"'" there is one result returned..

Thanks for the previous messages...

"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Quote:
Hello,

I think you can try set the ParamType and DataType of the parameter and =
call the Prepare() method before doing that. So insert the line =
"if(!qy->Prepared) qy->Prepare();" after the "where" clause and before =
execute the query.

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =
news:402a1707$1 (AT) newsgroups (DOT) borland.com...
=20
Hello Jayme,
=20
Yes I run with Debug.
aEmployeeNum is an AnsiString and its value is a valid employee num.
I execute the syntax #1 with Informix and there is no pb but with =
oracle there is no result.=20
Do you think I have to declare the bind variable before ?
=20
Thanks for your advice regarding ODAC, I will try it as soon as I =
can..
=20
Dominique
=20
=20
"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Hello,

Did you run the application with debug ? What is the type of =3D
"aEmployeeNum" ? What is the value of "aEmployeeNum" ?=3D20

You should try ODAC components (http://crlab.com/odac/) , they are =
very =3D
good and cheap !=3D20

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =3D
news:4029ec18$1 (AT) newsgroups (DOT) borland.com...
=3D20
Problem in setting bind variable with borland cpp and oracle 9.2
=3D20
case #1:
=3D20
TQuery *qy=3D3DNewQuery(Application);
qy->SQL->Text=3D3D" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=3D3D:prmEmpNum ");
qy->ParamByName("prmEmpNum")->AsString=3D3DaEmployeeNum;
qy->Open();
=3D20
the result of this query is the same as this one : Select =3D
use_employee_num From t_user where use_employee_num=3D3D' '
The bind variable prmEmpNum seems not to be set.
=3D20
=3D20
Case #2=3D20
TQuery *qy=3D3DNewQuery(Application);
qy->SQL->Text=3D3D" SELECT use_employee_num ";
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num=3D3D'" + aEmployeeNum + "' ");
qy->Open();
=3D20
the result of this query is the result of : Select =
use_employee_num =3D
From t_user where use_employee_num=3D3D'aEmployeeNum'=3D20
and aEmployeeNum is not an empty string
=3D20
does anyone know why there is difference in the result between =
these 2 =3D
queries and why the bind variable seems not to be set ?
=3D20
Thanks in advance

=20



Back to top
Jayme Jeffman Filho
Guest





PostPosted: Wed Feb 11, 2004 8:27 pm    Post subject: Re: Pb setting Bind variables Reply with quote

Hello,

Try this one :

TQuery *qy=NewQuery(Application);
// TParam *prm = NULL;
if ( qy ){
try{
//prm = qy->Params->CreateParam(ftString, "use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num = :use_employee_num ");
// I've changed the line order
if(!qy->Prepared) qy->Prepare();
qy->ParamByName("use_employee_num")->AsString = "toto";
//paramstring help me to debug
AnsiString paramstring = qy->ParamByName("use_employee_num")->AsString;
qy->Open();

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote

Quote:

Hello,

I tried this code but it's still not working, an idea ?

TQuery *qy=NewQuery(Application);
TParam *prm = NULL;
if ( qy ){
try{
prm = qy->Params->CreateParam(ftString, "use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num = :use_employee_num ");
qy->ParamByName("use_employee_num")->AsString = "toto";
//paramstring help me to debug
AnsiString paramstring = qy->ParamByName("use_employee_num")->AsString;
if(!qy->Prepared) qy->Prepare();
qy->Open();

And there is still no result... but if i replace the where clause with ...."WHERE use_employee_num='" + toto +"'" there is one result returned..

Thanks for the previous messages...




Back to top
dominique
Guest





PostPosted: Thu Feb 12, 2004 9:10 am    Post subject: Re: Pb setting Bind variables Reply with quote


Hello,
I tried it but it's still not working.
I use Cpp builder version 5.0 , do you think I could try to updgrade cpp builder or bde release ?
I think I could try to change my oracle odbc driver, what do you think about that ?

"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Quote:
Hello,

Try this one :

TQuery *qy=3DNewQuery(Application);
// TParam *prm =3D NULL;
if ( qy ){
try{
//prm =3D qy->Params->CreateParam(ftString, =
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D :use_employee_num ");
// I've changed the line order
if(!qy->Prepared) qy->Prepare();
qy->ParamByName("use_employee_num")->AsString =3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D =
qy->ParamByName("use_employee_num")->AsString;
qy->Open();

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =
news:402a74ec$1 (AT) newsgroups (DOT) borland.com...
=20
Hello,
=20
I tried this code but it's still not working, an idea ?
=20
TQuery *qy=3DNewQuery(Application);
TParam *prm =3D NULL;
if ( qy ){
try{
prm =3D qy->Params->CreateParam(ftString, =
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D :use_employee_num ");
qy->ParamByName("use_employee_num")->AsString =3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D =
qy->ParamByName("use_employee_num")->AsString;
if(!qy->Prepared) qy->Prepare();
qy->Open();
=20
And there is still no result... but if i replace the where clause with =
..."WHERE use_employee_num=3D'" + toto +"'" there is one result =
returned..
=20
Thanks for the previous messages...
=20




Back to top
Jayme Jeffman Filho
Guest





PostPosted: Thu Feb 12, 2004 12:16 pm    Post subject: Re: Pb setting Bind variables Reply with quote

Hello,

Did you try the same kind of query using another field in the where clause, a number field for example ?
I use the same structure as you but with Oracle 8i (8.1.7) and it works very well. What ODBC driver are you using ? The Oracle or Micrsoft ? If Microsoft try Oracle .

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote

Quote:

Hello,
I tried it but it's still not working.
I use Cpp builder version 5.0 , do you think I could try to updgrade cpp builder or bde release ?
I think I could try to change my oracle odbc driver, what do you think about that ?

"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Hello,

Try this one :

TQuery *qy=3DNewQuery(Application);
// TParam *prm =3D NULL;
if ( qy ){
try{
//prm =3D qy->Params->CreateParam(ftString, =
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D :use_employee_num ");
// I've changed the line order
if(!qy->Prepared) qy->Prepare();
qy->ParamByName("use_employee_num")->AsString =3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D =
qy->ParamByName("use_employee_num")->AsString;
qy->Open();

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =
news:402a74ec$1 (AT) newsgroups (DOT) borland.com...
=20
Hello,
=20
I tried this code but it's still not working, an idea ?
=20
TQuery *qy=3DNewQuery(Application);
TParam *prm =3D NULL;
if ( qy ){
try{
prm =3D qy->Params->CreateParam(ftString, =
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D :use_employee_num ");
qy->ParamByName("use_employee_num")->AsString =3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D =
qy->ParamByName("use_employee_num")->AsString;
if(!qy->Prepared) qy->Prepare();
qy->Open();
=20
And there is still no result... but if i replace the where clause with =
..."WHERE use_employee_num=3D'" + toto +"'" there is one result =
returned..
=20
Thanks for the previous messages...
=20





Back to top
dominique
Guest





PostPosted: Thu Feb 12, 2004 1:51 pm    Post subject: Re: Pb setting Bind variables Reply with quote

Hello,
You're right the same kind of query with a number field works very well. Is there a particular thing to do with string fields ?

FYI: I use Oracle 9.2 and Oracle ODBC driver distributed with the Oracle 9.2 client....

Your advices help me to understand step to step my problem...

Dominique

"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Quote:
Hello,

Did you try the same kind of query using another field in the where =
clause, a number field for example ?=20
I use the same structure as you but with Oracle 8i (8.1.7) and it works =
very well. What ODBC driver are you using ? The Oracle or Micrsoft ? If =
Microsoft try Oracle .

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =
news:402b42ee$1 (AT) newsgroups (DOT) borland.com...
=20
Hello,
I tried it but it's still not working.
I use Cpp builder version 5.0 , do you think I could try to updgrade =
cpp builder or bde release ?
I think I could try to change my oracle odbc driver, what do you think =
about that ?
=20
"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Hello,

Try this one :

TQuery *qy=3D3DNewQuery(Application);
// TParam *prm =3D3D NULL;
if ( qy ){
try{
//prm =3D3D qy->Params->CreateParam(ftString, =3D
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D3D :use_employee_num ");
// I've changed the line order
if(!qy->Prepared) qy->Prepare();
qy->ParamByName("use_employee_num")->AsString =3D3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D3D =3D
qy->ParamByName("use_employee_num")->AsString;
qy->Open();

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =3D
news:402a74ec$1 (AT) newsgroups (DOT) borland.com...
=3D20
Hello,
=3D20
I tried this code but it's still not working, an idea ?
=3D20
TQuery *qy=3D3DNewQuery(Application);
TParam *prm =3D3D NULL;
if ( qy ){
try{
prm =3D3D qy->Params->CreateParam(ftString, =3D
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D3D :use_employee_num ");
qy->ParamByName("use_employee_num")->AsString =3D3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D3D =3D
qy->ParamByName("use_employee_num")->AsString;
if(!qy->Prepared) qy->Prepare();
qy->Open();
=3D20
And there is still no result... but if i replace the where clause =
with =3D
..."WHERE use_employee_num=3D3D'" + toto +"'" there is one result =3D
returned..
=3D20
Thanks for the previous messages...
=3D20


=20



Back to top
Jayme Jeffman Filho
Guest





PostPosted: Thu Feb 12, 2004 3:55 pm    Post subject: Re: Pb setting Bind variables Reply with quote

Hello,

It seems that the AsString property is not working. Lets try to set the parameter ParamType and DataType properties after preparing the query and then pass the bind value as a string.

TQuery *qy= NewQuery(Application);
if ( qy ){
try{
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D3D :use_employee_num ");
if(!qy->Prepared) qy->Prepare();
qy->ParamByName("use_employee_num")->ParamType = ptInput; // ==>> new line
qy->ParamByName("use_employee_num")->DataType = ftString ; // ==>> new line
qy->ParamByName("use_employee_num")->AsString = "toto";
//paramstring help me to debug
AnsiString paramstring = qy->ParamByName("use_employee_num")->AsString;
qy->Open();


If this code still not work try exchange the AsString property by the Value property :
qy->ParamByName("use_employee_num")->Value = "toto";

I've played all the cards I had on my hand. If it don't workout it should be an Oracle 9.2 version issue with BDE components. Try to download a demo version of ODAC components ([url]http://www.crlab.com/odac)[/url], they work with Oracle from 8.04 to the 9th version.

HTH

Jayme.


"dominique" <dominique.hugot (AT) hp (DOT) com> wrote

Quote:

Hello,
You're right the same kind of query with a number field works very well. Is there a particular thing to do with string fields ?

FYI: I use Oracle 9.2 and Oracle ODBC driver distributed with the Oracle 9.2 client....

Your advices help me to understand step to step my problem...

Dominique

"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Hello,

Did you try the same kind of query using another field in the where =
clause, a number field for example ?=20
I use the same structure as you but with Oracle 8i (8.1.7) and it works =
very well. What ODBC driver are you using ? The Oracle or Micrsoft ? If =
Microsoft try Oracle .

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =
news:402b42ee$1 (AT) newsgroups (DOT) borland.com...
=20
Hello,
I tried it but it's still not working.
I use Cpp builder version 5.0 , do you think I could try to updgrade =
cpp builder or bde release ?
I think I could try to change my oracle odbc driver, what do you think =
about that ?
=20
"Jayme Jeffman Filho" <jjeffman (AT) cpovo (DOT) net> wrote:
Hello,

Try this one :

TQuery *qy=3D3DNewQuery(Application);
// TParam *prm =3D3D NULL;
if ( qy ){
try{
//prm =3D3D qy->Params->CreateParam(ftString, =3D
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D3D :use_employee_num ");
// I've changed the line order
if(!qy->Prepared) qy->Prepare();
qy->ParamByName("use_employee_num")->AsString =3D3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D3D =3D
qy->ParamByName("use_employee_num")->AsString;
qy->Open();

HTH

Jayme.

"dominique" <dominique.hugot (AT) hp (DOT) com> wrote in message =3D
news:402a74ec$1 (AT) newsgroups (DOT) borland.com...
=3D20
Hello,
=3D20
I tried this code but it's still not working, an idea ?
=3D20
TQuery *qy=3D3DNewQuery(Application);
TParam *prm =3D3D NULL;
if ( qy ){
try{
prm =3D3D qy->Params->CreateParam(ftString, =3D
"use_employee_num",ptInput);
qy->SQL->Add("SELECT use_employee_num ");
qy->SQL->Add("FROM t_user ");
qy->SQL->Add("WHERE use_employee_num =3D3D :use_employee_num ");
qy->ParamByName("use_employee_num")->AsString =3D3D "toto";
//paramstring help me to debug
AnsiString paramstring =3D3D =3D
qy->ParamByName("use_employee_num")->AsString;
if(!qy->Prepared) qy->Prepare();
qy->Open();
=3D20
And there is still no result... but if i replace the where clause =
with =3D
..."WHERE use_employee_num=3D3D'" + toto +"'" there is one result =3D
returned..
=3D20
Thanks for the previous messages...
=3D20


=20




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.