The xBasic code below creates the following SQL select statement
and executes it on the current connection.
The problem is that as shown on the attached captured snippet it never returns any records on the debug interactive window used for testing code. It works without a hitch if I test the xbasic code on the LOCALHOST or if I copy the resulting SQL select statement and execute it against my database.
I have tested my SQL code many times before on the interactive window and it had always worked just fine, can any of you see what am I doing wrong here?
Capture.JPG
Code:
SELECT website_id, google_analytics_account FROM website_config WHERE website_url = "pablosmasterjeweler" AND website_status = 1 AND sysdate() BETWEEN start_date AND end_date;
The problem is that as shown on the attached captured snippet it never returns any records on the debug interactive window used for testing code. It works without a hitch if I test the xbasic code on the LOCALHOST or if I copy the resulting SQL select statement and execute it against my database.
I have tested my SQL code many times before on the interactive window and it had always worked just fine, can any of you see what am I doing wrong here?
Code:
if session.targetURL = " " session.targetURL = "pablosmasterjeweler" end if ' ----------------------------------------------------------------------------------------------------------- ' Access website_config table to retrieve website_id ' ----------------------------------------------------------------------------------------------------------- Select_exp = "SELECT website_id, google_analytics_account FROM website_config " Select_exp = Select_exp + "WHERE website_url = \"" + session.targetURL + "\" AND website_status = 1 " Select_exp = Select_exp + "AND sysdate() BETWEEN start_date AND end_date;" if .not. e.conn.execute(Select_exp) bpage = "Error: " + e.conn.CallResult.text e.conn.close() end end if dim session.website_id as N = 2 dim session.ganalytact as C = "" rs = e.conn.ResultSet if rs.NextRow() session.website_id = rs.data("website_id") session.ganalytact = rs.data("google_analytics_account") end if
Comment