Great Tutorial, simple and well explained, no extra complicated details just the basic stuff to get started. one small thing. the first few minutes of video refers to Microsoft SQL Management studio. I spent 5 minutes trying to find this window in vb6 doh.
Hi Martin - this is really very good. I've copied things like-for-like - different DB name and table name. When I enter text in the field and click ADD, I'm getting a runtime error "invalid object name 'Product'"...product being the table name. I've also tried dbo.Product ( as it appears in Management Studio)...any suggestions please? Thanks David
Hi Martin, you have the best tutorial thank u... I just have a problem when I input all the data then click add, then i go to SQL type " select * from Cars" .."Cars" wont auto-populate that is why the Data is not in SQL.. although I dont have error message in VB, pls. help, tnx
Hi Kendra, I assume you created the DB and the Cars table and wrote the Insert statement to add the new record to the DB when the Add button is clicked?
Martin Allen yup, i created the table in SQL then next is the Form in VB6, just like the way you do it, now Im not able to add the new Item in SQL DB & i have an error in VB "incorrect syntax near description" this one is highlighted when i Debug it "aConnection.Execute sql"
judd luna Sorry about the delay. When you say exit SQL, do you mean exit your SQL Server Management Studio program or your own app? For select statements, are you writing them in this format: aRecSet.Open "select...", aConnection, adOpenKeyset aRecSet.Close aConnection.Execute "insert..." And in Form_Unload, do you have: aConnection.Close
Martin Allen Its ok now but, can u help me, with these.. I have 4 Labes & each label has 10 textboxes below them, do u have a code that when I input data on all textboxes it will line up in my SQL table that I made?
kendra Hi Kendra, would you mind posting this at my VB forum: www.martin2k.co.uk/forums/viewforum.php?f=13 ? Only because it is better for posting code, and there is more room, etc.
I want to learn from you in the making of a program ... Make an explanation of this program (Loder) to pass the receiver updates starsat 8800 hd hayber I will put you a picture link (loader). The link to the program I want to create : The link to the program I want to create
Thanks for the comment. This is just a simple example of how to get SQL to work with VB6 and security is beyond the scope of what I was trying to show. Although you make a good point as it’s a very important thing to consider. I did mention it briefly at around 11:00 but didn’t call it SQL injection as such.
Great Tutorial, simple and well explained, no extra complicated details just the basic stuff to get started. one small thing. the first few minutes of video refers to Microsoft SQL Management studio. I spent 5 minutes trying to find this window in vb6 doh.
Thank Very much Sir.....all my desperate Search ends Here.....
Thank A lot again sir.......
Useful guide to VB6 programming and SQL with ADO
Martin,
Thank very much for an excellent presentation. Very clear and very easy.
Thanks for the comment - I'm glad it was helpful.
Awesome tutorial! Just what i needed
Nice tutorial Sir....
Thanks man!!! was very helpful!!!
Great tutorial, thanks for sharing.
it is really useful
Hi Martin - this is really very good. I've copied things like-for-like - different DB name and table name. When I enter text in the field and click ADD, I'm getting a runtime error "invalid object name 'Product'"...product being the table name. I've also tried dbo.Product ( as it appears in Management Studio)...any suggestions please?
Thanks
David
Did you add the relevant reference and download SSMS? Details of both of these can be seen on my blog (see link in video comment).
How can we add emails and phone number
I get error here: aConnection.Execute sql
Getting error in form_load()
please help
Hi Martin, you have the best tutorial thank u... I just have a problem when I input all the data then click add, then i go to SQL type " select * from Cars" .."Cars" wont auto-populate that is why the Data is not in SQL.. although I dont have error message in VB, pls. help, tnx
Hi Kendra, I assume you created the DB and the Cars table and wrote the Insert statement to add the new record to the DB when the Add button is clicked?
Martin Allen yup, i created the table in SQL then next is the Form in VB6, just like the way you do it, now Im not able to add the new Item in SQL DB & i have an error in VB "incorrect syntax near description" this one is highlighted when i Debug it "aConnection.Execute sql"
judd luna Sorry about the delay. When you say exit SQL, do you mean exit your SQL Server Management Studio program or your own app? For select statements, are you writing them in this format:
aRecSet.Open "select...", aConnection, adOpenKeyset
aRecSet.Close
aConnection.Execute "insert..."
And in Form_Unload, do you have:
aConnection.Close
Martin Allen Its ok now but, can u help me, with these.. I have 4 Labes & each label has 10 textboxes below them, do u have a code that when I input data on all textboxes it will line up in my SQL table that I made?
kendra Hi Kendra, would you mind posting this at my VB forum: www.martin2k.co.uk/forums/viewforum.php?f=13 ? Only because it is better for posting code, and there is more room, etc.
hey getting odbc driver doesnt support the request error ...i did everything like u did can u help
Not working :/
I want to learn from you in the making of a program ... Make an explanation of this program (Loder) to pass the receiver updates starsat 8800 hd hayber I will put you a picture link (loader).
The link to the program I want to create : The link to the program I want to create
Please do not concatenate user input directly into the SQL string. This allows for SQL injection.
Thanks for the comment. This is just a simple example of how to get SQL to work with VB6 and security is beyond the scope of what I was trying to show. Although you make a good point as it’s a very important thing to consider. I did mention it briefly at around 11:00 but didn’t call it SQL injection as such.
when i use this code to connect to sql ,some error was occur "NullreferenceExeption was handled.lpease help me'
how to get name of provider
This tutorial is very helpful. I want your help using Anydesk. If you agree pls contact with me.
Method or data member not found at inserting text data
At what point in the video do you experience difficulties?