Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

seems to be major bugs in new fm 11 odbc driver


This topic is 5056 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

there seems to be some major bugs in the new 11.x odbc driver that comes with filemaker any suggestions would be appreciated.

We are trying to pull data out of filemaker and into sql server via the odbc driver

using ssis/dts or linked servers do not work becuase the driver is not returning any metadata (ie column names/types) and any attempt

fails becuase both methods need this to map input columns to output columns.

So then i tried a solution that should not require meta data.. using vb script (you run the following with the cscript command)

this should work on anyones install and pulls data from the sample database and generates a file:

but in this case the text/string columns are not coming out..

Again any suggestions would be appreciated

Option Explicit

Dim objFSO, objOutFile

Dim conn

Dim intCount, i

Set objFSO = CreateObject("Scripting.FileSystemObject") 'create and open text file

Set objOutFile = objFSO.CreateTextFile("sampleoutput.txt",TRUE)

Dim col1

Set conn = CreateObject("ADODB.Connection")

conn.ConnectionTimeout = 45

conn.CommandTimeout = 45

' conn.ConnectionString = "DSN=sample;UID=admin;PWD="

conn.ConnectionString = "Server=localhost;Database=FMServer_sample;Driver={FileMaker ODBC};UID=admin;PWD="

conn.Open

col1 = ""

Dim SQLStmtComp

Dim rsComp

Set SQLStmtComp = CreateObject("ADODB.Command")

Set rsComp = CreateObject ("ADODB.Recordset")

SQLStmtComp.CommandText = "select * " &_

" from " & chr(34) & "English_Nature" & chr(34)

SQLStmtComp.CommandType = 1

Set SQLStmtComp.ActiveConnection = conn

SQLStmtComp.CommandTimeout = 45 'Timeout per Command

objOutFile.WriteLine "sql = " & SQLStmtComp.CommandText & vbCrLf 'newline

'response.Write "sql = " & SQLStmtComp.CommandText

rsComp.Open SQLStmtComp

intCount = rsComp.Fields.Count

objOutFile.WriteLine "number of cols = " & intCount & vbCrLf 'newline

do until rsComp.EOF 'loop to cycle through the table

objOutFile.WriteLine "Status = " & rsComp("Status") & vbCrLf

objOutFile.WriteLine "Author = " & rsComp("Author") & vbCrLf

objOutFile.WriteLine "Desc = " & rsComp("Description") & vbCrLf

for i = 0 to intCount-1 'loop to cycle through fields of each table and write to file

objOutFile.Write rsComp.fields.item(i) & ","

next

objOutFile.WriteLine vbCrLf 'newline

rsComp.MoveNext

Loop

conn.close

thanks

This topic is 5056 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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