recordset open' option

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi there,
My code is "recordset.open strSQL, connection,,,adcmdtext"
the strSQL is like "select item1, item2 from qryInfo", qryInfo is a query, I
always got wrong message no matter what option i chose, could you help me
figure it out?

clara
 
hi Clara,
My code is "recordset.open strSQL, connection,,,adcmdtext"
the strSQL is like "select item1, item2 from qryInfo", qryInfo is a query, I
always got wrong message no matter what option i chose, could you help me
figure it out?
Post the entier method. Your quote leaves too many questions open.


mfG
--> stefan <--
 
Hi Stefan,

now, the whole problem boils down to the following:
if I use "select * from qryInfo where size = 'small'" then it doesn't work
but if I use "select * from qryInfo where [size]='small'" then it works
what does [] mean here?

thank you so much for your time

clara
 
hi
now, the whole problem boils down to the following:
if I use "select * from qryInfo where size = 'small'" then it doesn't work
but if I use "select * from qryInfo where [size]='small'" then it works
what does [] mean here?
Size is a reserved word (http://support.microsoft.com/kb/321266).

Reserverd words or names containing special characters must be enclosed
in square bracktes. Otherwise Jet doesn't recognize them.
It is the equivalent to " in other SQL idoms.


mfG
--> stefan <--
 
Thank you very much stafan. Sometime it is hard to find the real reason from
the run-time message dialogue. when you are in such case, what can you do?

clara
--
thank you so much for your help


Stefan Hoffmann said:
hi
now, the whole problem boils down to the following:
if I use "select * from qryInfo where size = 'small'" then it doesn't work
but if I use "select * from qryInfo where [size]='small'" then it works
what does [] mean here?
Size is a reserved word (http://support.microsoft.com/kb/321266).

Reserverd words or names containing special characters must be enclosed
in square bracktes. Otherwise Jet doesn't recognize them.
It is the equivalent to " in other SQL idoms.


mfG
--> stefan <--
 
hi Clara,
Thank you very much stafan. Sometime it is hard to find the real reason from
the run-time message dialogue. when you are in such case, what can you do?
Try and error and a locally installed MSDN library to read as many
related articles. In many cases i can then remember where to look for a
solution, which safes a lot of research time.

Search the archives. Most of all problems where discussed already.

mfG
--> stefan <--
 
Back
Top