Click here to Skip to main content
16,004,782 members
Home / Discussions / C#
   

C#

 
AnswerRe: RichTextBox control Pin
Dave Kreskowiak18-Oct-05 7:47
mveDave Kreskowiak18-Oct-05 7:47 
QuestionLog in Pin
momoo17-Oct-05 16:46
momoo17-Oct-05 16:46 
QuestionHow to wrap the produce of the set xml mapping to excel 2003? A VSTO Beginner Pin
dreamwinter17-Oct-05 16:19
dreamwinter17-Oct-05 16:19 
QuestionHow to convert array to a stream? Pin
rushing17-Oct-05 16:10
rushing17-Oct-05 16:10 
AnswerRe: How to convert array to a stream? Pin
Andy Moore17-Oct-05 16:35
Andy Moore17-Oct-05 16:35 
QuestionNeed help with pocket pc code. Pin
futbolkeeper17-Oct-05 15:57
futbolkeeper17-Oct-05 15:57 
Questionaxwebbrowser and clickevent Pin
legend_rajesh17-Oct-05 15:20
legend_rajesh17-Oct-05 15:20 
QuestionDataSet info getting lost Pin
cvncpu17-Oct-05 12:23
cvncpu17-Oct-05 12:23 
I have this set of code which is suppose to take a dataset, transfer it to a server via a web service, and then populate a databse with the information that is in the dataset however, I have an error where there appears to be no data in the dataset once it gets to the webservice, the data seems to be fine when it leaves the program, but is lost by the time it gets to the server.

userinfo is the WebService
here is the code for the program:
private void button2_Click(object sender, System.EventArgs e)<br />
{<br />
    try <br />
    {<br />
        dg1.Tables[0].Rows[0]["COMPANYNAME"]=txtCompany.Text;<br />
        dg1.Tables[0].Rows[0]["FAX"]=txtFax.Text;<br />
        dg1.Tables[0].Rows[0]["PHONE"]=txtTelephone.Text;<br />
        dg1.Tables[0].Rows[0]["POSTALCODE"]=txtZipcode.Text;<br />
        dg1.Tables[0].Rows[0]["COUNTRY"]=txtCountry.Text;<br />
        dg1.Tables[0].Rows[0]["STATEPROVINCE"]=txtState.Text;<br />
        dg1.Tables[0].Rows[0]["CITY"]=txtCity.Text;<br />
        dg1.Tables[0].Rows[0]["ADDRESS2"]=txtAddr2.Text;<br />
        dg1.Tables[0].Rows[0]["ADDRESS1"]=txtAddr.Text;<br />
        dg1.Tables[0].Rows[0]["Title"]=txtTitle.Text;<br />
        dg1.Tables[0].Rows[0]["NAME"]=txtName.Text;<br />
        dg1.AcceptChanges();<br />
        MessageBox.Show(userinfo.SetUserInfo("uberducks2", dg1, UserID.GetValue("UID").ToString()));<br />
        cmdApply.Enabled=false;<br />
    }<br />
    catch (Exception d)<br />
    {<br />
        MessageBox.Show(string.Format("Error During Runtime: {0}", d.Message));<br />
    }<br />
}


This is the WebService Code:
public string SetUserInfo(string AuthID, DataSet dg1, string UserID) <br />
{<br />
    if (AuthID=="*****") <br />
    {<br />
        try <br />
        {<br />
            string Name=dg1.Tables[0].Rows[0]["NAME"].ToString();<br />
            string Title=dg1.Tables[0].Rows[0]["TITLE"].ToString();<br />
            string Addr=dg1.Tables[0].Rows[0]["ADDRESS1"].ToString();<br />
            string Addr2=dg1.Tables[0].Rows[0]["ADDRESS2"].ToString();<br />
            string City=dg1.Tables[0].Rows[0]["CITY"].ToString();<br />
            string State=dg1.Tables[0].Rows[0]["STATEPROVINCE"].ToString();<br />
            string Country=dg1.Tables[0].Rows[0]["COUNTRY"].ToString();<br />
            string Zipcode=dg1.Tables[0].Rows[0]["POSTALCODE"].ToString();<br />
            string Telephone=dg1.Tables[0].Rows[0]["PHONE"].ToString();<br />
            string Fax=dg1.Tables[0].Rows[0]["FAX"].ToString();<br />
            Oconn.Open();<br />
            string sqlcmd="UPDATE ACCOUNTUSER SET COMPANYNAME = '"+Company+"', NAME = '"+Name+"', TITLE= '"+Title+"', ADDRESS1='"+Addr+"', ADDRESS2='"+Addr2+"', CITY='"+City+"', STATEPROVINCE='"+State+"', COUNTRY='"+Country+"', POSTALCODE='"+Zipcode+"', TELEPHONE='"+Telephone+"', FAX='"+Fax+"' WHERE USERID='"+UserID+"';";<br />
            SqlCommand brb=new SqlCommand(sqlcmd, Oconn);<br />
            brb.ExecuteScalar();<br />
            Oconn.Close();<br />
            return "it seems to have worked.";<br />
        } <br />
        catch (Exception e) <br />
        {<br />
            return e.StackTrace.ToString();<br />
        }<br />
    }


http://digg.com
Questionhow create a file with System.IO.IsolatedStorage Pin
Sasuko17-Oct-05 12:04
Sasuko17-Oct-05 12:04 
AnswerRe: how create a file with System.IO.IsolatedStorage Pin
Dave Kreskowiak18-Oct-05 7:46
mveDave Kreskowiak18-Oct-05 7:46 
QuestionDatatable and PostBacks Pin
TheMajorRager17-Oct-05 10:48
TheMajorRager17-Oct-05 10:48 
AnswerRe: Datatable and PostBacks Pin
Christian Graus17-Oct-05 12:19
protectorChristian Graus17-Oct-05 12:19 
GeneralRe: Datatable and PostBacks Pin
TheMajorRager17-Oct-05 13:37
TheMajorRager17-Oct-05 13:37 
GeneralRe: Datatable and PostBacks Pin
Christian Graus17-Oct-05 14:20
protectorChristian Graus17-Oct-05 14:20 
GeneralRe: Datatable and PostBacks Pin
tatchung17-Oct-05 15:57
tatchung17-Oct-05 15:57 
GeneralRe: Datatable and PostBacks Pin
Christian Graus17-Oct-05 16:06
protectorChristian Graus17-Oct-05 16:06 
GeneralRe: Datatable and PostBacks Pin
tatchung17-Oct-05 16:16
tatchung17-Oct-05 16:16 
GeneralRe: Datatable and PostBacks Pin
TheMajorRager18-Oct-05 6:52
TheMajorRager18-Oct-05 6:52 
GeneralRe: Datatable and PostBacks Pin
Christian Graus18-Oct-05 11:58
protectorChristian Graus18-Oct-05 11:58 
AnswerRe: Datatable and PostBacks Pin
MoustafaS17-Oct-05 15:52
MoustafaS17-Oct-05 15:52 
QuestionHelp - Please Help Get Windows User Pin
horacyjr17-Oct-05 9:46
horacyjr17-Oct-05 9:46 
AnswerRe: Help - Please Help Get Windows User Pin
Daniel Grunwald17-Oct-05 10:27
Daniel Grunwald17-Oct-05 10:27 
QuestionConst in C# - question Pin
Yanshof17-Oct-05 9:20
Yanshof17-Oct-05 9:20 
AnswerRe: Const in C# - question Pin
Rob Philpott17-Oct-05 11:10
Rob Philpott17-Oct-05 11:10 
AnswerRe: Const in C# - question Pin
Christian Graus17-Oct-05 12:20
protectorChristian Graus17-Oct-05 12:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.