Client Program-To-Web Database
I'm writing a VB application that has to talk to a database on a website. The method I've come up with is this:
Client program submits an SQL statement to a webpage through a querystring (IE: http://test.com/default.asp?SQL=SELECT * FROM BOOKS)
The page would then run the query string, and then return a recordset (if it was a SELECT statement).
Two questions:
1)Is there a better way?
2)How do I keep the page from caching?
cjqp
Re: Client Program-To-Web Database
Quote:
Originally posted by cjqp
I'm writing a VB application that has to talk to a database on a website. The method I've come up with is this:
Client program submits an SQL statement to a webpage through a querystring (IE: http://test.com/default.asp?SQL=SELECT * FROM BOOKS)
The page would then run the query string, and then return a recordset (if it was a SELECT statement).
Two questions:
1)Is there a better way?
2)How do I keep the page from caching?
cjqp
That is extremly dangerous !!
Imageine if a some one passes this
"Delete From Books"
Or even worse Delete all the Table using SQL Statement. Even without passing SQL stement "Injection Attack" are causing havoc on many web sites. Under no circomostance you should pass SQL Query over a HTTP connection.
My suggestion would be to Return data as XML and your VB App will simply read the returned XML and display the data.
say in Server you will have Book.asp
Design your book asp which can take up parameters such as BookName, Category, AuthorName, Publisher etc and return the filter data as XML.
Hope this helps.
Hope this helps.