1-
This works fine from an Excel Mudule:
Dim CNN As New ADODB.Connection
Dim rs As New ADODB.Recordset
a="some description"
CNN.Open "VVSHOW"
Set rs = CNN.Execute("SELECT ""DESC"",CATEGORY,ITEMNO ,COMMENT1,COMMENT2 FROM items WHERE (""DESC"" Like '%" & a & "' And ITEMNO Not Like ('%[A-Z]%')and COMMENT3='VHS')")
MsgBox rs!DESC
rs.Close
Set rs = Nothing
CNN.Close
Set CNN = Nothing
However when I tried to open the connection with this :
CNN.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
db_file & ";"
I get EOF error !
can anyone tell me why ?
2- can I burn my excel project and MDB file on a cd and run from CD ? ( I only need to read data from the data base)
This works fine from an Excel Mudule:
Dim CNN As New ADODB.Connection
Dim rs As New ADODB.Recordset
a="some description"
CNN.Open "VVSHOW"
Set rs = CNN.Execute("SELECT ""DESC"",CATEGORY,ITEMNO ,COMMENT1,COMMENT2 FROM items WHERE (""DESC"" Like '%" & a & "' And ITEMNO Not Like ('%[A-Z]%')and COMMENT3='VHS')")
MsgBox rs!DESC
rs.Close
Set rs = Nothing
CNN.Close
Set CNN = Nothing
However when I tried to open the connection with this :
CNN.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
db_file & ";"
I get EOF error !
can anyone tell me why ?
2- can I burn my excel project and MDB file on a cd and run from CD ? ( I only need to read data from the data base)