|
Can't Figure Out Connection String -
Hello,
I have a ODBC Data Source for a SQL Server. The text connection was good. I am trying to connect with my VB application to the database with ADODB. I get a "Operation is not allowed when object is closed message". Basically, my connection is not open and methods fail. The DSN Datasource is named LAVA. Can you help? Dim rst As ADODB.Recordset Dim cnn As ADODB.Connection Set cnn = New ADODB.Connection cnn.Open "DSN=LAVA;" Set rst = New ADODB.Recordset rst.Open "GIS_Data", cnn, adOpenForwardOnly, adLockReadOnly Dim fld As ADODB.Field For Each fld In rst.Fields Debug.Print fld.Name Next cnn.Close rst.Close
|