Results 1 to 2 of 2

Thread: Access and SQL for VB.NEt

  1. #1

    Thread Starter
    Join Date
    Nov 2005

    Access and SQL for VB.NEt

    I am trying to insert update and delet data from an SQL table. I am trying to insert first, this is what I have

    Dim myDS As New DataSet
    Dim myConn As OleDbConnection
    Dim myCommand As OleDbDataAdapter
    Dim strConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.Mappath("././././My Documents/team.mdb")
    Dim strSQL As String
    Dim strprocess As String
    Dim txtprocess As TextBox

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    'txtprocess.Text = strprocess

    strSQL = "Insert Into team_track(process) VALUES('" & strprocess & "')"
    can some one help me understand were I went wrong..
    Thanks in advance.

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    Re: Access and SQL for VB.NEt

    If that's all the code you have then you haven't created the connection or the command. You wouldn't use a data adapter to insert a single row either. I suggest that you take a look at some of the tutorials in my signature. The ADO.NET-specific ones are offline at the moment but many of the other sahve ADO.NET sections.

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