BowDown Posted December 4, 2006 Posted December 4, 2006 I bought the optionpack which now enabled me to enable ODBC access to my hosted databases.. Well on my client computer I set up a datasource as per FM instructions. I can see all the hosted files on the server, and it sucessfully tests to the file I'm trying to access through VB Script. Well when I attempt to retrieve information from the lineItems table that's in the file configured as a windows datasource I get a parse error. What gives? I have tried every possible syntax change in my SQL Query. The parse error comes on the line of code that is Executing the query. Here's my code. Any ideas? It tests find in the windows datasource manager. '----------------------------------------------------------- 'Read in the information from the FM8 Stairs Database and put into a 'CSV File for future Adventures '----------------------------------------------------------- Set fso = CreateObject("Scripting.FileSystemObject") Set OBJdbConnection = CreateObject("ADODB.Connection") 'Username and password removed by me, legit ones are actually there in the real script. OBJdbConnection.Open "FM8ODBC", "username", "password" SQLQuery = "SELECT * FROM lineItems WHERE quoteNo = '50300';" Set Result = OBJdbConnection.Execute(SQLQuery) Set outFile = fso.OpenTextFile(odbcDump, 2, true) if Not Result.EOF then Do While Not Result.EOF if (Not IsNull(Result("itemNo")) And Not IsNull(Result("description"))) Then returnLineNo = CStr(Result("itemNo")) returnLineDesc = CStr(Result("description")) outFile.WriteLine returnLineNo + chr(179) + returnLineDesc end if Result.MoveNext Loop end if OBJdbConnection.Close outFile.Close
Recommended Posts
This topic is 6563 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now