Hello ? Anybody home ?
Is my problem too difficult to be solved ? or should I setting up these manually ?
Any link and comments are appreciated. Thanks in advance :-)
>Hi all,
>
>I have a Customer Table with these following fields :
>
>CustID ---> Char(10) ---> Primary Key
>CustName ---> Char(30)
>
>and these are my listing :
>
>DataSet DS = new DataSet();
>SqlDataAdapter DA = new SqlDataAdapter("Select * from customer");
>DA.MissingSchemaAction = MissingSchemaAction.AddWithKey;
>SqlCommandBuilder SQLBuilder = new SqlCommandBuilder(DA);
>DA.Fill(DS, "customer");
>DA.InsertCommand = SQLBuilder.GetInsertCommand();
>DA.UpdateCommand = SQLBuilder.GetUpdateCommand();
>DA.DeleteCommand = SQLBuilder.GetDeleteCommand();
>
>System.Console.WriteLine(DA.UpdateCommand.CommandText);
>System.Console.ReadLine();
>
>the result is :
>UPDATE [customer] SET CustID=@p1, CustName=@p2 WHERE CustID=@p3 AND CustName=@p4
>
>The question is :
>
>How to make WHERE's Clause just only using Primary Key ?
>
>( I know that we can setting up manually, but that's not what I looking for )
>
>Thanks in advance :-D
Handi Rusli
"Treat people with respect and courtesy, and one will be blessed. Complete task heartily, with best effort and responsibility, and one can achieve the greatest."