I can't open a recordset!!! I wonder why - here's what I did...
Private Const DBFile = "C:\TestDB\DB.mdb"
Private Const SQLString = "Select * FROM Product;"
Private RS as new Recordset
Private DB as Database
Private Sub Form_Load()
Set DB = Workspaces(0).OpenDatabase(DBFile) 'This works
Set RS = DB.OpenRecordset(SQLString)
End Sub
This doesn't work, because I get a type mismatch! When I used to use DAO 3.51, the first parameter for the OpenRecordset method was [source], where the path of the Access file was entered. Now, it's asking for a [Name] property, and I'm certain that's why I'm getting the type mismatch. Now, if the method is called OPEN RECORDSET, and the return value is a RECORDSET... um.... why won't it allow me to send it the dumbest, simplest SQL string on this very planet????
Any help would be appreciated! Peace
Lego
"I don't think we have the right or the wisdom to interfere with an alien tribe no matter how it's evolving!" - Captain James T. Kirk
"Your people must embrace these words and the words that follow, for their true meanings are..." - Captain James T. Kirk (same episode)
Private Const DBFile = "C:\TestDB\DB.mdb"
Private Const SQLString = "Select * FROM Product;"
Private RS as new Recordset
Private DB as Database
Private Sub Form_Load()
Set DB = Workspaces(0).OpenDatabase(DBFile) 'This works
Set RS = DB.OpenRecordset(SQLString)
End Sub
This doesn't work, because I get a type mismatch! When I used to use DAO 3.51, the first parameter for the OpenRecordset method was [source], where the path of the Access file was entered. Now, it's asking for a [Name] property, and I'm certain that's why I'm getting the type mismatch. Now, if the method is called OPEN RECORDSET, and the return value is a RECORDSET... um.... why won't it allow me to send it the dumbest, simplest SQL string on this very planet????
Any help would be appreciated! Peace
Lego
"I don't think we have the right or the wisdom to interfere with an alien tribe no matter how it's evolving!" - Captain James T. Kirk
"Your people must embrace these words and the words that follow, for their true meanings are..." - Captain James T. Kirk (same episode)