How to Use SQL Server with VB6 (inc. select & insert)

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • This video shows how to create a simple 1 table database in SQL Server Management Studio and then use Visual Basic 6.0 to access it and insert new records in a simple program. The download link to Microsoft SQL Server Express 2008 R2 can be found on my blog: www.martin2k.co...

ความคิดเห็น • 33

  • @albertpizzarello1147
    @albertpizzarello1147 10 ปีที่แล้ว +1

    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.

  • @omrajeshkbangalore2092
    @omrajeshkbangalore2092 8 ปีที่แล้ว +3

    Thank Very much Sir.....all my desperate Search ends Here.....
    Thank A lot again sir.......

  • @vb6programming170
    @vb6programming170 9 ปีที่แล้ว +1

    Useful guide to VB6 programming and SQL with ADO

  • @RobertoGabrielLino
    @RobertoGabrielLino 9 ปีที่แล้ว +1

    Martin,
    Thank very much for an excellent presentation. Very clear and very easy.

    • @NitramGTi
      @NitramGTi  9 ปีที่แล้ว

      Thanks for the comment - I'm glad it was helpful.

  • @AnaSofiaGrilo96
    @AnaSofiaGrilo96 10 ปีที่แล้ว +2

    Awesome tutorial! Just what i needed

  • @JigoLigo
    @JigoLigo 9 ปีที่แล้ว +1

    Great tutorial, thanks for sharing.

  • @edgarjc9275
    @edgarjc9275 6 ปีที่แล้ว +1

    Thanks man!!! was very helpful!!!

  • @ayushagrawal1063
    @ayushagrawal1063 7 ปีที่แล้ว +1

    it is really useful

  • @TheZahid2008
    @TheZahid2008 3 ปีที่แล้ว

    Nice tutorial Sir....

  • @NitramGTi
    @NitramGTi  11 ปีที่แล้ว

    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).

  • @davidredmayne7269
    @davidredmayne7269 10 ปีที่แล้ว

    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

  • @carsondalmore5439
    @carsondalmore5439 10 ปีที่แล้ว

    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

    • @NitramGTi
      @NitramGTi  10 ปีที่แล้ว

      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?

    • @carsondalmore5439
      @carsondalmore5439 10 ปีที่แล้ว

      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"

    • @champdalmore3133
      @champdalmore3133 10 ปีที่แล้ว

      Martin Allen thank you Martin, its working now, the problem is when I add the Item, is not automatically added in SQL, why I need to Exit SQL then open it again, then Its there added... I owe my project to you Martin =)

    • @NitramGTi
      @NitramGTi  10 ปีที่แล้ว

      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

    • @carsondalmore5439
      @carsondalmore5439 10 ปีที่แล้ว

      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?

  • @MrMujahidselim
    @MrMujahidselim 7 ปีที่แล้ว

    This tutorial is very helpful. I want your help using Anydesk. If you agree pls contact with me.

  • @mujib3514
    @mujib3514 10 ปีที่แล้ว

    I get error here: aConnection.Execute sql

  • @tejasbhagat7916
    @tejasbhagat7916 5 ปีที่แล้ว

    How can we add emails and phone number

  • @hakim_6267
    @hakim_6267 5 ปีที่แล้ว

    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

  • @anandiyengar2792
    @anandiyengar2792 9 ปีที่แล้ว

    hey getting odbc driver doesnt support the request error ...i did everything like u did can u help

  • @vasukishayana9807
    @vasukishayana9807 11 ปีที่แล้ว

    Getting error in form_load()
    please help

  • @BrianMoosLindberg
    @BrianMoosLindberg 7 ปีที่แล้ว

    Please do not concatenate user input directly into the SQL string. This allows for SQL injection.

    • @NitramGTi
      @NitramGTi  7 ปีที่แล้ว

      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.

  • @thohayvietnam1809
    @thohayvietnam1809 6 ปีที่แล้ว

    when i use this code to connect to sql ,some error was occur "NullreferenceExeption was handled.lpease help me'

  • @RachitSinghpal
    @RachitSinghpal 9 ปีที่แล้ว

    Not working :/

  • @pramodbigp
    @pramodbigp 10 ปีที่แล้ว

    Method or data member not found at inserting text data

    • @NitramGTi
      @NitramGTi  10 ปีที่แล้ว

      At what point in the video do you experience difficulties?