the length of SQL string

J

JIM. H.

Hello,
I am using db.Execute sqlString to run a SQL statement in
a module. My questions are as follows.
1. What is the max number of characters in a table name?
2. Is there any limitation on the length of sqlString if
I use is after db.execute?
3. After executing db.Execute sqlString, I get erro 3134
but in watch window I could not see the values of whole
sqlString, it is truncated. how can I see that?
Thanks,
Jim.
 
M

Michael Hopwood

JIM. H. said:
Hello,
I am using db.Execute sqlString to run a SQL statement in
a module. My questions are as follows.
1. What is the max number of characters in a table name?

64. Look in help for "specifications"
2. Is there any limitation on the length of sqlString if
I use is after db.execute?

64,000 (approx.) see help
3. After executing db.Execute sqlString, I get erro 3134
but in watch window I could not see the values of whole
sqlString, it is truncated. how can I see that?

Error 3134 = Syntax error in INSERT INTO statement.

Post your code including SQL statement.
 
J

John Spencer (MVP)

Also, you might try using
Debug.Print sqlString
in your code while you are testing.

This will print the SQL to the immediate pane. You can copy and paste that into
a QUERY and then try to run the query. You will get a better indicator of the
exact location of the error. Another method is to just type
?sqlString
in the immediate window when your code is paused. That will print the SQL in
the immediate window also.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top