-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: SensualHrushi
Message 1 in Discussion


        Hi,
        Iam trying to create an SQL INSERT query in C# at the back end.
        I have a stored procedure which returns the column name and the Data
Type of that column.
        The result is captured in a dataset.
        What iam trying is,for every row of that table in the dataset iam
trying to compare the data Type with int /char but its not giving me the
result.
        Can any body help.
        The code is here.
foreach( DataRow dr in dataset.Tables[0].Rows)
                {
                        int count=0;
                        string
strType=dataset.Tables[0].Rows[count][1].ToString() ;
Comment:every time its goes through the loop strType returns int value
only,and not what is there in the dataset.
                        if( strType == "int")                           
                        {
        
Response.Write(dataset.Tables[0].Rows[count]["DataType"].ToString());

                                        strColumnNames = strColumnNames +
dr[count].ToString(); 
                                        count=count+1;
                        }
                }

Can anybody throw some light here.

Ambarish G Purohit
Software Engineer



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to