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

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

Vertical Alligning - Not working in 1 cell?
<?php

echo "<table id="valign" width="60%" style=

my sql select id and then update problem.
I need to select some auto incremented ids out of a database and then use those id in a where statem

OPINIONS WANTED
This is my login page code, and I want your opinion on it please!

Code: // Login ~ CHECKS

Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.

These usually span

C++ Http request?
Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = Sy

Variable uses and placement
I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any do

php code generators
All

Whilst enjoying learning a new language i have come accross a number of free code generat

passing data from one page to another
hey guys
i have the follwoing code to get information from one page and place on another:

Extracting URL pointer within XML tag
Hi.

I'm trying to extract text between two quotation marks in XML. For example, I want to ex

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

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