Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. database still not affected

database still not affected

Scheduled Pinned Locked Moved ASP.NET
helpdatabasesysadminquestioncareer
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abu sultan
    wrote on last edited by
    #1

    hi all, many thanx to you guys .. ur really doin a great job but my problem still accours .. i have no error messages against execution but the database not affected anything after this command (dbcommand.ExecuteNonQuery()) is ignored i don't know why?!! here is the code .. Private Sub addbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addbtn.Click Dim conn As New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0; data source=" + Server.MapPath("mydatabase.mdb")) conn.Open() Try Dim sql As String sql = "insert into table1(column1,column2) values ('" & txt1.Text & "','" & txt2.Text & "') " Dim dbcommand As New OleDb.OleDbCommand(sql, conn) dbcommand.ExecuteNonQuery() Catch ex As Exception End Try conn.Close() End Sub anyone could help me with this plz.

    E 1 Reply Last reply
    0
    • A abu sultan

      hi all, many thanx to you guys .. ur really doin a great job but my problem still accours .. i have no error messages against execution but the database not affected anything after this command (dbcommand.ExecuteNonQuery()) is ignored i don't know why?!! here is the code .. Private Sub addbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addbtn.Click Dim conn As New OleDb.OleDbConnection("provider=microsoft.jet.oledb.4.0; data source=" + Server.MapPath("mydatabase.mdb")) conn.Open() Try Dim sql As String sql = "insert into table1(column1,column2) values ('" & txt1.Text & "','" & txt2.Text & "') " Dim dbcommand As New OleDb.OleDbCommand(sql, conn) dbcommand.ExecuteNonQuery() Catch ex As Exception End Try conn.Close() End Sub anyone could help me with this plz.

      E Offline
      E Offline
      enjoycrack
      wrote on last edited by
      #2

      Hi there, Your code looks good, IMO. How about if trying with another DB (maybe SQL server)...? if good, maybe the problem with MS Access. Try to reinstall it (my friends did experience this issue, after reinstalling, everything is fine) If you find out better way, post it here. Thanx << >>

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups