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. ASP.NET updating Ms Access Database

ASP.NET updating Ms Access Database

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelpquestion
8 Posts 3 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.
  • D Offline
    D Offline
    DotNet
    wrote on last edited by
    #1

    Regarding about the ASP.NET updating Ms Access Database. I try to change most of the System.Data.SqlClient thing to System.Data.OleDb. I still find the problem. Is there any solution?

    S 1 Reply Last reply
    0
    • D DotNet

      Regarding about the ASP.NET updating Ms Access Database. I try to change most of the System.Data.SqlClient thing to System.Data.OleDb. I still find the problem. Is there any solution?

      S Offline
      S Offline
      Steve McLenithan
      wrote on last edited by
      #2

      You have not told us the problem... Simply changing System.Data.SqlClient to OleDb doesnt fix anything tho. All your connections, adapters etc still have to be changed

      Found on Bash.org
      [erno] hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.

      D 1 Reply Last reply
      0
      • S Steve McLenithan

        You have not told us the problem... Simply changing System.Data.SqlClient to OleDb doesnt fix anything tho. All your connections, adapters etc still have to be changed

        Found on Bash.org
        [erno] hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.

        D Offline
        D Offline
        DotNet
        wrote on last edited by
        #3

        I changed this code: MyCommand.Parameters.Add(New SqlParameter("@vchPCID", SqlDbType.NVarChar, 5)) MyCommand.Parameters.Add(New SqlParameter("@vchModelName", SqlDbType.NVarChar, 50)) MyCommand.Parameters.Add(New SqlParameter("@mnyPrice", SqlDbType.NVarChar, 8)) MyCommand.Parameters.Add(New SqlParameter("@vchDesc", SqlDbType.NChar, 100)) to MyCommand.Parameters.Add(New OleDbParameter("@PCID", OleDbType.Numeric, 5)) MyCommand.Parameters.Add(New OleDbParameter("@ModelName", OleDbType.VarChar, 50)) MyCommand.Parameters.Add(New OleDbParameter("@Price", OleDbType.Currency, 8)) MyCommand.Parameters.Add(New OleDbParameter("@Description", OleDbType.VarChar, 100)) I still fail to update. Note: my connection is to Ms Access Database. Please help. Thanks.

        S 1 Reply Last reply
        0
        • D DotNet

          I changed this code: MyCommand.Parameters.Add(New SqlParameter("@vchPCID", SqlDbType.NVarChar, 5)) MyCommand.Parameters.Add(New SqlParameter("@vchModelName", SqlDbType.NVarChar, 50)) MyCommand.Parameters.Add(New SqlParameter("@mnyPrice", SqlDbType.NVarChar, 8)) MyCommand.Parameters.Add(New SqlParameter("@vchDesc", SqlDbType.NChar, 100)) to MyCommand.Parameters.Add(New OleDbParameter("@PCID", OleDbType.Numeric, 5)) MyCommand.Parameters.Add(New OleDbParameter("@ModelName", OleDbType.VarChar, 50)) MyCommand.Parameters.Add(New OleDbParameter("@Price", OleDbType.Currency, 8)) MyCommand.Parameters.Add(New OleDbParameter("@Description", OleDbType.VarChar, 100)) I still fail to update. Note: my connection is to Ms Access Database. Please help. Thanks.

          S Offline
          S Offline
          Steve McLenithan
          wrote on last edited by
          #4

          MyCommand.Parameters.Add(New SqlParameter("@vchPCID", SqlDbType.NVarChar, 5)) MyCommand.Parameters.Add(New SqlParameter("@vchModelName", SqlDbType.NVarChar, 50)) MyCommand.Parameters.Add(New SqlParameter("@mnyPrice", SqlDbType.NVarChar, 8)) MyCommand.Parameters.Add(New SqlParameter("@vchDesc", SqlDbType.NChar, 100)) that is fine, u shouldnt have changed it ( i dont think) u need to change things like SqlConnection to OleDbConnection and SqlDataAdapter to OleDbAdapter and SqlCommand to OleDbCommand

          Found on Bash.org
          [erno] hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.

          D 1 Reply Last reply
          0
          • S Steve McLenithan

            MyCommand.Parameters.Add(New SqlParameter("@vchPCID", SqlDbType.NVarChar, 5)) MyCommand.Parameters.Add(New SqlParameter("@vchModelName", SqlDbType.NVarChar, 50)) MyCommand.Parameters.Add(New SqlParameter("@mnyPrice", SqlDbType.NVarChar, 8)) MyCommand.Parameters.Add(New SqlParameter("@vchDesc", SqlDbType.NChar, 100)) that is fine, u shouldnt have changed it ( i dont think) u need to change things like SqlConnection to OleDbConnection and SqlDataAdapter to OleDbAdapter and SqlCommand to OleDbCommand

            Found on Bash.org
            [erno] hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.

            D Offline
            D Offline
            DotNet
            wrote on last edited by
            #5

            If I don't change, I will see this Compiler Error Message: BC30002: Type 'SqlParameter' is not defined. Line 36: MyCommand = New OleDbCommand(UpdateCmd, MyConnection) Line 37: Line 38: MyCommand.Parameters.Add(New SqlParameter("@PCID", SqlDbType.Numeric, 5)) Line 39: MyCommand.Parameters.Add(New SqlParameter("@ModelName", SqlDbType.VarChar, 50)) Line 40: MyCommand.Parameters.Add(New SqlParameter("@Price", SqlDbType.Currency, 8)) So how?

            S 1 Reply Last reply
            0
            • D DotNet

              If I don't change, I will see this Compiler Error Message: BC30002: Type 'SqlParameter' is not defined. Line 36: MyCommand = New OleDbCommand(UpdateCmd, MyConnection) Line 37: Line 38: MyCommand.Parameters.Add(New SqlParameter("@PCID", SqlDbType.Numeric, 5)) Line 39: MyCommand.Parameters.Add(New SqlParameter("@ModelName", SqlDbType.VarChar, 50)) Line 40: MyCommand.Parameters.Add(New SqlParameter("@Price", SqlDbType.Currency, 8)) So how?

              S Offline
              S Offline
              Steve McLenithan
              wrote on last edited by
              #6

              Ok maybe u do have to change it to oleDb param. but did u change the other things I told u as well?

              Found on Bash.org
              [erno] hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.

              D 1 Reply Last reply
              0
              • S Steve McLenithan

                Ok maybe u do have to change it to oleDb param. but did u change the other things I told u as well?

                Found on Bash.org
                [erno] hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.

                D Offline
                D Offline
                DotNet
                wrote on last edited by
                #7

                Yes, I have change. I used code-behind thing.

                M 1 Reply Last reply
                0
                • D DotNet

                  Yes, I have change. I used code-behind thing.

                  M Offline
                  M Offline
                  Mark Wehde
                  wrote on last edited by
                  #8

                  I'm working on something similar. What do you have so far?

                  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