lol, ok cool it works. Thanks heaps... It's almost time to celebrate!
I say almost because there is just one more thing I'd like to fix. The code works fine so long as there is something in the table already. But when the table is empty it has an error saying that it can't cast the type Int32...
Hey,
It seems to be all good except for one thing. The line of code where you have "reader = .executequery" I get an error that says "ExecuteQuery is not a member of System.Data.OleDb.OleDbCommand".
I'm not really sure what to do with it. I looked it up on the net and I think I need to use a...
Hey Anti-Rich, I tried that but I still get the error "The number of query strings does not match the number of destination fields" - it seems I must insert something into the ID field (which is an autonumber cause I double checked). Here is the code again after doing what you suggested that was...
how do I just not add a value to the autonumber field? I've tried a few things but I keep getting errors about there not being a value added or if I simply leave out the field it says that the number of values and fields being added does not match the destination. Here is the code I have at the...
Ok, cool. I did get some errors but its all good now and I got it working. There is just one problem; I have an ID column that is of type autonumber. I don't know how to get around this, how do I insert a new row with one of the columns being an autonumber? I've had a look on the net but it...
Ok I'll start reading up on parameterised queries. I'd like to do INSERT and DELETE next, and could you show me how to do these without doing it through the datagrid? Thanks so much for your help vis781, I really appreciate you giving up time to help me out like this.
That'd be right lol. Yeah I was kicking myself laughing. And thanks for the encouragement, I plan to stick this out.
Anyway, I have read through that stuff and I understand it all (I must admit that ADO tutorial did help after all).
Thanks for leaving the full.. I don't know what you call it...
Ok I have gone through the tutorial and this is the code I have come up with:
PublicClass Form1
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim word AsString
word = "hello"
Dim objConnection As ADODB.Connection
Dim rstResults As...
The code
Ok well this is the code that is supposed to do the database stuff but I want you to know that I'm not really sure what it is all supposed to do because I used some free code from the net and modified it slightly.
Also, I have currently scrapped all the code to do with databases and...
Hi,
I have been trying to add a row to an access database using Vb.net for about 3 weeks now and I just can't get it to work.
I am desperate, I have tried multitudes of tutorials on the internet and I have gone through as many forums trying to find out how to do this but to no avail.
Its...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.