Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ODBC Woes with Server 8?

Featured Replies

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

  • Author

Me no need a ;

LOL, that was simple.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.