Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Building InsertCommand for data adapter ? sql data types ?


Message #1 by "Rohit Arora" <rohit_arora@i...> on Tue, 11 Mar 2003 16:36:20 +0530
Hi Group,
	I wanted to Update a dataadapter and need to build an insert command. Now
in insertCommand of dataadapter I have to pass the sql datatype of that
column. But I have all this information in xsd  from which that datatable
reads the schema. Bu(I know there is a class to map between xsd datatypes
and clr datatypes but what i need is to get sql datatype for that xsd data
type. Does is sounds okie. Is there any class for this ? Any way ?

for(int i = 0; i < alTableFields.Count; i++)
{
	spQueryParameters = daProject.InsertCommand.Parameters.Add("@" +
alTableFields[i].ToString(), SqlDbType.?? );
	spQueryParameters.SourceColumn = alTableFields[i].ToString();
	spQueryParameters.SourceVersion = DataRowVersion.Current;
}

Regards
Rohit Arora
Intersolutions (P) Ltd
B - 21, Sector 58,
Noida - 201301
Tel : 91-2585703/04/05 Extn: 229

"Desire means never Quit. It may be near when it seems far, so stick to the
fight when you are hardest hit.Its when things go wrong, that u must not
Quit."


  Return to Index