Dawood Abbas

Dawood Abbas

  • NA
  • 264
  • 98.2k

Unable to run sql query using my ip address into another pc

Aug 6 2015 1:22 AM
I published my web .net application on local server, and running it to on my pc's browser with some querystring values then its working properly, but when running it to from other local pc which is connected with network not working ..

in page load i am counting parameters and checking it to some const value then entering to some action codes, else displaying error msg like 'please provide values'. so whenever i am browsing 'http://192.168.1.22:8091/UserPayment.aspx?OID=1024&MID=10&CID=102&UID=92&PAMT=50&TOT=03082015142000&CPHNO=9000959239&RCPT=1024&CHKNUM=0&TT=2'

thowing an error : The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Receive_Payment_CompanyRegistered". The conflict occurred in database "crm", table "dbo.CompanyRegistered", column 'Comp_Id'. The statement has been terminated. where as after debugg application directly not throwing any error its excecuting and inserting record sucessfully.
 
if (numberOfParameter == 10)      {       int OrranizationID = 0, MachineID = 0, empId = 0, customerId = 0;       string PhoneNo = Request.QueryString["CPHNO"] == null ? "0" : Request.QueryString["CPHNO"].ToString();       string RecieptNo = Request.QueryString["RCPT"] == null ? "0" : Request.QueryString["RCPT"].ToString();       string ChequeNo = Request.QueryString["CHQNUM"] == null ? "0" : Request.QueryString["CHQNUM"].ToString();       string PaidAmnt = Request.QueryString["PAMT"] == null ? "0" : Request.QueryString["PAMT"].ToString();       string TransactionTime = Request.QueryString["TOT"] == null ? "0" : Request.QueryString["TOT"].ToString();     OrranizationID = Convert.ToInt32(Request.QueryString["OID"] == null ? "0" : Request.QueryString["OID"].ToString());     MachineID = Convert.ToInt32(Request.QueryString["MID"] == null ? "0" : Request.QueryString["MID"].ToString());     empId = Convert.ToInt32(Request.QueryString["UID"] == null ? "0" : Request.QueryString["UID"].ToString());      customerId = Convert.ToInt32(Request.QueryString["CID"] == null ? "0" : Request.QueryString["CID"].ToString()); }        else        {         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alert", "alert('Please provide PaymentInfo');", true);        }
 

Answers (3)