passing a .sql file through access

M

m

I need to be able to call a .sql file from within access
and have it execute the contents against an sql server
connection. The code in the file is approximately four
times longer than a string variable will hold.

What is the best method for pulling this off?

thanks a million
 
D

Douglas J. Steele

What do you mean by "four times longer than a string variable will hold"?
Are you perhaps confusing string variables with the text data type (which is
limited to 255 characters)? According to the Help file,

"There are two kinds of strings: variable-length and fixed-length strings.

· A variable-length string can contain up to approximately 2 billion (2^31)
characters.
· A fixed-length string can contain 1 to approximately 64K (2^16)
characters."

I can't imagine an sql statement that's longer than 64K characters!
 
D

Douglas J. Steele

http://www.mvps.org/access/api/api0004.htm at "The Access Web"

--
Doug Steele, Microsoft Access MVP



Well I had been under the impression that a string
variable could only hold up to around 37,000 characters.
But I have solved that part of the problem by using the
SHELL command to execute the OSQL utility which can run
the file against the database for me.

My Problem now is how to wait until the SHELL command
finishes before moving onto the next step.

Thanks for your help
 

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