Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : asp.net hangs on invalid list idsSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 asp.net hangs on invalid list ids 
 Author   Message 
  jody powlette 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-08-06 
 Profile
 Posted : 2008-08-06 08:15:36
when running a statement like this:

insert into customer (Name, ParentRefListID, JobStatus, JobDesc, JobTypeRefFullName, BillAddressAddr1, BillAddressAddr2, BillAddressAddr3, BillAddressAddr4, BillAddressCity, BillAddressState, BillAddressPostalCode, BillAddressCountry, SalesRepRefListID) values ('6961','710000-1014653884 ','Awarded','Test Page','Ad Hoc', '', '', '', '', '', '', '', '', '1F0000-1038942040')

if the SalesRepRefListID value '1F0000-1038942040' does not exist in the SalesRep table, the statement hangs the page and no error is returned. From the test app and from a c# windows app it correctly reports "The given object ID '' in the 'list id' is invalid". How can get this error to return or an exception throw in asp.net instead of hanging the page? AspCompat already equals "true".

Thanks 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-08-06 09:53:37
This is really a .NET question, try looking at: ASP.NET Technical Articles: HTTP Error Trapping 

  Top 
  jody powlette 
  
 Group: Members 
 Posts: 2 
 Joined: 2008-08-06 
 Profile
 Posted : 2008-08-06 11:36:21

I know how to catch errors in asp.net - the problem is the driver doesn't throw an exception to catch..  Here's some complete code:

 

        string connectionString = "DSN=QuickBooks Data";
        OdbcConnection connection1 = new OdbcConnection(connectionString);

        OdbcCommand com1 = new OdbcCommand();
        com1.Connection = connection1;
         
        com1.CommandText = "insert into customer (Name, ParentRefListID, JobStatus, JobDesc, JobTypeRefFullName, BillAddressAddr1, BillAddressAddr2, BillAddressAddr3, BillAddressAddr4, BillAddressCity, BillAddressState, BillAddressPostalCode, BillAddressCountry, SalesRepRefListID) values ('6961','710000-1014653884 ','Awarded','Test Page','Ad Hoc', '', '', '', '', '', '', '', '', '1F0000-1038942040') ";
        com1.ExecuteNonQuery();

Running this produces no error and the page never returns. When running from a windows forms app I get a nice error message that I can work with, but not so in an asp.net page.

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-08-06 12:53:57

QODBC is still generating the error, but you need to catch it. Others have used:

try{

//some code here

}

catch(e){

Response.Write(e.description);
}

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to