Hi
I am needing to connect to an external database using filedsn but I am not having much luck at the moment.
Initially I tried:
Dim conn = New Odbc.OdbcConnection
conn.ConnectionString = "FileDsn=Inserted my fieldsn here"
but it complained with:
type odbc.odbcconnection not defined
thought I just needed to Import something but couldn't get it to work so revised it to:
Dim conn = New Data.Odbc.OdbcConnection
conn.ConnectionString = "FileDsn=inserted my filedsn here"
and tried again but got the following error instead:
ERROR [HY000] General error: Invalid file dsn ''
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] General error: Invalid file dsn ''
Source Error:
Line 34:
Line 35: ' open connection
Line 36: conn.Open()
I am unsure if it is my code or if I need to set something up on my home pc to allow me to access the external database which the filedsn is referring to?
Completely new to this so any pointers in the right direction would be great. Don't know if it helps/makes a difference but I am using vb.net on Windows Vista Home Premium....
Hope something can help
thanks
I am needing to connect to an external database using filedsn but I am not having much luck at the moment.
Initially I tried:
Dim conn = New Odbc.OdbcConnection
conn.ConnectionString = "FileDsn=Inserted my fieldsn here"
but it complained with:
type odbc.odbcconnection not defined
thought I just needed to Import something but couldn't get it to work so revised it to:
Dim conn = New Data.Odbc.OdbcConnection
conn.ConnectionString = "FileDsn=inserted my filedsn here"
and tried again but got the following error instead:
ERROR [HY000] General error: Invalid file dsn ''
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] General error: Invalid file dsn ''
Source Error:
Line 34:
Line 35: ' open connection
Line 36: conn.Open()
I am unsure if it is my code or if I need to set something up on my home pc to allow me to access the external database which the filedsn is referring to?
Completely new to this so any pointers in the right direction would be great. Don't know if it helps/makes a difference but I am using vb.net on Windows Vista Home Premium....
Hope something can help
thanks