ASP.NET updating Ms Access Database
-
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?
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. -
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.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.
-
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.
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. -
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.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?
-
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?
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. -
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. -
I'm working on something similar. What do you have so far?