Problem with the Update command used with a sqldataadapter


Posted on 16th Feb 2014 07:03 pm by admin

I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldataset generated at DESIGNTIME.
I want to call the update command asociated with a sqldataadapter but I don't want to use all the parametres in the command becose I don't need to.
An sqlUpdateCommand created at DESIGNTIME look like this

Did you know?Explore Trending and Topic pages for more stories like this.
this.sqlUpdateCommand1.CommandText = @"UPDATE masini SET producatoriID = @producatoriID, tip = @tip, combustibil = @combustibil, pret = @pret, [data achizitiei] = @Param2 WHERE (masiniID = @Original_masiniID) AND (combustibil = @Original_combustibil) AND ([data achizitiei] = @Original_data_achizitiei) AND (pret = @Original_pret) AND (producatoriID = @Original_producatoriID OR @Original_producatoriID IS NULL AND producatoriID IS NULL) AND (tip = @Original_tip); SELECT masiniID, producatoriID, tip, combustibil, pret, [data achizitiei] FROM masini WHERE (masiniID = @masiniID)";

Pls get me out of this mess.


And another thing. If you have some documentation on Crystal Reports (for SQL Server databases) please send me an e-mail with an attach file.
No comments posted yet

Your Answer:

Login to answer
134 Like 53 Dislike
Previous forums Next forums
Other forums

How to get variable value on next page
Hello friends
i am working on payentry page ..there i have this code.........

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

Most basic form question ever?
Hello,

I want to use this snippet to make sure the fields in a form are ok before processing

help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when

Check before inserting in DB ???
This is my code
---------------
if ( $_POST ['Submit'])
{{
$username = $_POST ['usernm

php automatically escaping single quotes
I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash