Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

cvncpu

@cvncpu
About
Posts
2
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • DataSet info getting lost
    C cvncpu

    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) { try { dg1.Tables[0].Rows[0]["COMPANYNAME"]=txtCompany.Text; dg1.Tables[0].Rows[0]["FAX"]=txtFax.Text; dg1.Tables[0].Rows[0]["PHONE"]=txtTelephone.Text; dg1.Tables[0].Rows[0]["POSTALCODE"]=txtZipcode.Text; dg1.Tables[0].Rows[0]["COUNTRY"]=txtCountry.Text; dg1.Tables[0].Rows[0]["STATEPROVINCE"]=txtState.Text; dg1.Tables[0].Rows[0]["CITY"]=txtCity.Text; dg1.Tables[0].Rows[0]["ADDRESS2"]=txtAddr2.Text; dg1.Tables[0].Rows[0]["ADDRESS1"]=txtAddr.Text; dg1.Tables[0].Rows[0]["Title"]=txtTitle.Text; dg1.Tables[0].Rows[0]["NAME"]=txtName.Text; dg1.AcceptChanges(); MessageBox.Show(userinfo.SetUserInfo("uberducks2", dg1, UserID.GetValue("UID").ToString())); cmdApply.Enabled=false; } catch (Exception d) { MessageBox.Show(string.Format("Error During Runtime: {0}", d.Message)); } } This is the WebService Code: public string SetUserInfo(string AuthID, DataSet dg1, string UserID) { if (AuthID=="*****") { try { string Name=dg1.Tables[0].Rows[0]["NAME"].ToString(); string Title=dg1.Tables[0].Rows[0]["TITLE"].ToString(); string Addr=dg1.Tables[0].Rows[0]["ADDRESS1"].ToString(); string Addr2=dg1.Tables[0].Rows[0]["ADDRESS2"].ToString(); string City=dg1.Tables[0].Rows[0]["CITY"].ToString(); string State=dg1.Tables[0].Rows[0]["STATEPROVINCE"].ToString(); string Country=dg1.Tables[0].Rows[0]["COUNTRY"].ToString(); string Zipcode=dg1.Tables[0].Rows[0]["POSTALCODE"].ToString(); string Telephone=dg1.Tables[0].Rows[0]["PHONE"].ToString(); string Fax=dg1.Tables[0].Rows[0]["FAX"].ToString(); Oconn.Open(); 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+"';"; S

    C# sysadmin help announcement

  • Dataset database issues
    C cvncpu

    I have this function: [WebMethod] public string SetUserInfo(string AuthID, DataSet dg2) { if (AuthID=="********") { Oconn.Open(); da.Update(dg2); Oconn.Close(); return "it seems to have worked."; } else { return "Your Authentication Failed"; } } and this is my da (dataAdapter) var: public SqlDataAdapter da = new SqlDataAdapter(); but it keeps coming back with an error: "Update unable to find TableMapping['Table'] or DataTable 'Table'" http://digg.com

    C# database com security help announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups