Ervin,
For:
myOleDbConnecti on = New ADODB.Connectio n
I'm getting this error:
"Value of type 'ADODB.Connecti onClass' cannot be converted to 'System.Data.Ol eDb.OleDbConnec tion'."
John...
User Profile
Collapse
-
Ervin,
Yes I have a datagrid that displays all database records and I have a Delete button.
Thanks for you help - you're code is more concise and therefore better than what I have.
John...Leave a comment:
-
I think I got it working now. I added this line and it now appears to work.
myOleDbConnecti on.Open()
so now the code looks like this:
[CODE=vb] Public Sub Delete_TableRow (ByVal RowNumber As Integer, ByVal KeyID As Integer)
myOleDbConnecti on = New _
OleDbConnection ("provider=micr osoft.jet.oledb .4.0;" & _
"user id=admin;...Leave a comment:
-
Record Delete - ExecuteNonQuery requires an open and available Connection
Hello,
I am amateur with VB database usage.
I've written a little database that keeps track of names, address, phone numbers etc. It displays the data in a DataGrid and stores them in a database. I am able to store and UPDATE new records without problems. Because of my ignorance of VB databases usage, I've tried for hours to get it to DELETE a record. I'm to the point I need to ask for expert help. Here is my code,...
No activity results to display
Show More
Leave a comment: