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 can you detect variable string in a massive string?
Ok guys, i need some help with this one.

I am going to be getting a large string, like 10-20

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

How to show the difference between two data field in a database with php.
Hello php gurus,

how r u all... i'm not so well facing a typical problem please help me...<

having probem inserting data into db table
hi

i have a table with following columns in it
Code: candidate_id, degree, cgpa, institute

Data Function is Its Not working IN IE8
This is my first time to use formums. I hope i can get solution for this problem. view plaincopy to

getAlexaRank($url) function not working
I have made a function to get alexa rank
the site is here: http://mytestsite.rack111.com/1

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

Preventing SQL Injection
I have a question about SQL Injection, In some of our code we use this: view plaincopy to clipboa

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

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