I'm trying to make a DSN-less connection to an Omnis ODBC database. I've tried to alter a working Foxpro connection by changing the driver from {Microsoft Visual FoxPro Driver} to {Omnis},and the source type=DF1 which is the file extension that Omnis uses. I'm trying the following code behind a command button to test the connection:
I get the following error:
'Information to establish a connection is insufficient or incorrect'
I cannot find a proper connection string for Omnis anywhere!
Does anyone have an Omnis connection string?
I am able to create a system DSN using the ODBC administrator.
Is there a way to extract the requirements for a DSN-less connection string from an existing DSN?
(Omnis is an obscure database made by Raining Data)
Any help would be appreciated!
Thanks,
Sup
Code:
Private Sub Command0_Click()
Dim File_path As String
Dim oconn As Connection
Dim File_name As String
File_path = "C:\Toolfiles.DF1"
File_name = "OMNIS_F_tools"
Set oconn = New Connection
oconn.Attributes = 3
oconn.Open "Driver={Omnis};" & _
"SourceType=DF1;" & _
"SourceDB=" & File_path & ";" & _
"Exclusive=No;"
Dim sqlstr As String
sqlstr = "SELECT * FROM " & File_name & "where TOOL_RSN = 3;"
Set rst = oconn.Execute(sqlstr)
MsgBox rst!TOOL_NUMBER
End Sub
I get the following error:
'Information to establish a connection is insufficient or incorrect'
I cannot find a proper connection string for Omnis anywhere!
Does anyone have an Omnis connection string?
I am able to create a system DSN using the ODBC administrator.
Is there a way to extract the requirements for a DSN-less connection string from an existing DSN?
(Omnis is an obscure database made by Raining Data)
Any help would be appreciated!
Thanks,
Sup