Hi Gang
I am tryin gto delete records from an access database but I continue to get error 3001 invalid argument. Here is the code i am trying to use and MySQL is "Delete * from Schedule where hour=0;". I am kinda doing a hit and miss approach here since the MS documentation is, well MS docuemntation. Why is this stuff so easy in ASP and so difficult in VB? Also, how can I specify that the database to be used is located on a server instead of locally? I am trying to do this project as an ActiveX control. When I try to run the page from other locations I get an ISAM error or no error at all and just a red x on the screen. I haven't put in any safe for scripting or safe for ???? code in my active X control.
Hope I don't sound too inept here.
TIA
Ken Patenaude
Private Sub DeleteRecordsetX(MySQL)
Dim dbsNorthwind As Database
Dim rstEmployees As Recordset
Dim lngID As Long
Set dbsNorthwind = OpenDatabase("C:\videoworx\videoworx.mdb"
Set GridData = dbsNorthwind.OpenRecordset( _
MySQL, dbOpenDynamic)
' Delete the employee record with the specified ID
' number.
With GridData
.Seek "=", "*"
If .NoMatch Then
Else
.Delete
End If
End With
rstEmployees.Close
dbsNorthwind.Close
End Sub
I am tryin gto delete records from an access database but I continue to get error 3001 invalid argument. Here is the code i am trying to use and MySQL is "Delete * from Schedule where hour=0;". I am kinda doing a hit and miss approach here since the MS documentation is, well MS docuemntation. Why is this stuff so easy in ASP and so difficult in VB? Also, how can I specify that the database to be used is located on a server instead of locally? I am trying to do this project as an ActiveX control. When I try to run the page from other locations I get an ISAM error or no error at all and just a red x on the screen. I haven't put in any safe for scripting or safe for ???? code in my active X control.
Hope I don't sound too inept here.
TIA
Ken Patenaude
Private Sub DeleteRecordsetX(MySQL)
Dim dbsNorthwind As Database
Dim rstEmployees As Recordset
Dim lngID As Long
Set dbsNorthwind = OpenDatabase("C:\videoworx\videoworx.mdb"
Set GridData = dbsNorthwind.OpenRecordset( _
MySQL, dbOpenDynamic)
' Delete the employee record with the specified ID
' number.
With GridData
.Seek "=", "*"
If .NoMatch Then
Else
.Delete
End If
End With
rstEmployees.Close
dbsNorthwind.Close
End Sub