473,388 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

updating database using parameters

Hi:
I have an access db that I'm accessing via ASP.Net. I'm using WebMatrix's
wizard to write the tedious db query code using parameters.
Select, insert, and delete work fine using the database parameters. I
can't seem to get the update code to work. If I write my own code using a
standard SQL statement like: "UPDATE db SET field='somevalue' WHERE
id=someinteger" : the update works properly. But with webmatrix's code, the
update doesn't occur. No error messages either, even with the try catch
blocks commented out.

I really need to use parameters here as the text boxes need to accept all
ascii characters, and I know what a single quote does to a SQL String.
If I cant get this problem solved, I'n going to have to set the update page
to first insert a new record then delete the old one. But I think that would
be the hard way .

CAn anyone make a suggestion?

Thanks,
Mark
Nov 18 '05 #1
1 1123
On Thu, 13 May 2004 00:40:42 -0400, "Mark" <py*******@hotmail.com>
wrote:
Hi:
I have an access db that I'm accessing via ASP.Net. I'm using WebMatrix's
wizard to write the tedious db query code using parameters.
Select, insert, and delete work fine using the database parameters. I
can't seem to get the update code to work. If I write my own code using a
standard SQL statement like: "UPDATE db SET field='somevalue' WHERE
id=someinteger" : the update works properly. But with webmatrix's code, the
update doesn't occur. No error messages either, even with the try catch
blocks commented out.

I really need to use parameters here as the text boxes need to accept all
ascii characters, and I know what a single quote does to a SQL String.
If I cant get this problem solved, I'n going to have to set the update page
to first insert a new record then delete the old one. But I think that would
be the hard way .


Just before executing the SQL, have it print to the screen that actual
SQL statement generated. Most likely, if there are no errors, the
"someinteger" value is being set to a nonsense value like 0, or the
"somevalue" item is being set to the old value (less likely). If you
spit out the SQL code, you can see what is being asked.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Harry Devine | last post by:
I have a DataGrid that is configured to use the Edit/Update/Cancel concept correctly. My grid shows values from 5 database fields. I only need to update that last 4 fields. The last field is a...
3
by: Justin | last post by:
I am trying to do a simple update of a database using a stored procedure. I have get the following error when executing the code: "Procedure or function UpdateDetails has too many arguments...
4
by: enrique | last post by:
Hi, I apologize for a newbie question, but my books/research have yielded me no examples and my time is now short. I simply want to update data from text boxes (fields). I'm not using a datagrid...
10
by: jaYPee | last post by:
does anyone experienced slowness when updating a dataset using AcceptChanges? when calling this code it takes many seconds to update the database SqlDataAdapter1.Update(DsStudentCourse1)...
6
by: Fred Geurtsen | last post by:
Question about updating a access Database Record! Normally i'm working with SQLserver, but i have to do this with access and it's not working. My error is: Operation must use an updateable query....
6
by: Rich | last post by:
Dim da As New SqlDataAdapter("Select * from tbl1", conn) dim tblx As New DataTable da.Fill(tblx) '--works OK up to this point da.UpdateCommand = New SqlCommand da.UpdateCommand.Connection =...
16
by: fniles | last post by:
I am using VB.NET 2003, SQL 2000, and SqlDataAdapter. For every record in tblA where colB = 'abc', I want to update the value in colA. In VB6, using ADO I can loop thru the recordset,set the...
2
by: Smurfas | last post by:
What's wrong? Compiletor don't show anything, but whet I start program show this error: "Error updating the employee details!" protected void Button1_Click(object sender, EventArgs e) ...
0
by: steve | last post by:
I have been fighting with trying to update a GridView for a while. I don't want to use the "built-in" way to do it because I am using business layer methods for updating and deleteing and I don't...
5
by: Bill Schanks | last post by:
I have a winform app (VB 2005) that allows users to export data to excel, make updates to the excel file and import the data from that Excel file and update the database. My question is: Is it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.