This is a discussion on Why my DB returning nothing when I use AJAX? within the ASP and ASP.NET Programming forums, part of the Web Development category; Hi all, I'm new to AJAX. If I do a ajax posting to an asp page that will returns ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi all, I'm new to AJAX. If I do a ajax posting to an asp page that will returns some values from db. And I build a variable "myVar" and do as follows. Code: response.write(myVar) Code: http_request.responseText="". I'm confusing why I'm getting this?
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| Sponsored Links |
| |||
| Thanks for the reply. Actually, I've independently verified that each piece is working. I've narrowed it down to the query string I create that calls the stored Proc on the server. Strangely, both return the same record, but ajax accepts only one: rsGetDatabasesQ2 = "exec spGetMostCurrentDatabaseStats '" & xServerName & "', '" & xDBName & "'" ^^^ this one I build the string dynam - doesn't work with ajax, but does return the correct recordset. rsGetDatabasesQ2 = "exec spGetMostCurrentDatabaseStats 'wavedev\wavedev', 'css'" ^^^ this one I explicitly pass the params in - does work with ajax, and returns the correct recordset. Hmm...I'm stumped.
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| |||
| I've further narrowed it down to the xServerName var in the query string. If I replace it with the value directly, it works. I know the var itself is correct because the process does return valid records form the database when its used. Ajax sure seems picky about things?
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| |||
| There are no "variables" in the query string. There are name/value pairs. Does the query string have an ampersand in it? ?something=th&is The "is" will be treated as the second name in the second name/value pair, as if the query sting were like this: ?something=th&anything=is Try it this way, ?something=th&is
__________________ cheers Aman |
| |||
| Hi aman! Any way thnx for your kind reply. I will go thru this way. ![]()
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to use ajax in asp.net and how to install ajax in my system | vel.m8 | ASP and ASP.NET Programming | 5 | 04-08-2008 08:55 PM |
| Drawback in Ajax | senraj | PHP Programming | 32 | 03-28-2008 11:54 PM |
| ajax | ursklakshmanan | PHP Programming | 3 | 03-17-2008 02:21 AM |
| why the "InvalidOperationException" error when returning array value in webservice? | leoraja8 | ASP and ASP.NET Programming | 7 | 11-14-2007 10:39 PM |
| declare an array of N pointers to functions returning ? | sundarraja | C and C++ Programming | 0 | 07-25-2007 04:58 AM |