Results 1 to 4 of 4

Thread: Vb to vb.net

  1. #1

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134

    Unhappy Vb to vb.net

    Can any one help me out I have been programming in vb but have now started to move over to vb.net have some problems

    in vb if you wanted to execute a sql statement it was easy one line.... connection.execute "Insert Into...."

    how do i just do something simple like this in .net?????

    ... using Access for the mo

    thanks

  2. #2
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112
    like this?
    VB Code:
    1. Dim cn As New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & Application.StartupPath & "\northwind.mdb")
    2.         cn.Open()
    3.         Dim cmdText = "insert into territories values('yo','mage',1)"
    4.         Dim cm As OleDb.OleDbCommand = New OleDb.OleDbCommand(cmdText, cn)
    5.         cm.ExecuteNonQuery()
    if not, sorry...

  3. #3

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134
    I keep getting a "Operation must use an updateable query."

  4. #4
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112
    i don't know about the previous vb, sorry. but this might help
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width