|
|
Home » ASP » Article
ASP SQL Display Queries in a Web Interface
|
| Article by: | Jeff Anderson ( 1362 ) (2/19/2003) |
|
| Sponsored by: | FindMyHosting - Web Hosting Search |
| Summary: | Instant access for developers to an Access or SQL database via a simple web interface. The interface can be used to run any queries including building tables, updating data and so on. |
|
| Viewed: 32492 times |
Rating (37 votes): |
|
4.3 out of 5 |
|
|
|
ASP SQL Display Queries in a Web Interface
|
|
As a database web developer, there is often a problem getting direct access to the database data - if it's an Access database, the only way is to download the .mdb file, make ammendments and then upload it again (often annoyingly resetting write permissions in the process.) SQL Server has the excellent query analyser, but you may be away from the server, without access to Enterprise Manager, or over a slow connection that would take logging in half an age.

That's where our Query Displayer saves the day. This piece of code is a neat way for you to access your data via the web. It's great for developers comfortable with SQL language to quickly and easily view or modify data in the database, without any software other than a standard browser.
One word of warning - anyone stumbling across this page could delete your entire database, so make sure you put it behind a secure password.
The script is ready to run, you'll need to add your odbc connection string, that's all.
|
|
View highlighted Comments
User Comments on 'ASP SQL Display Queries in a Web Interface'
|
|
|
|
|
|
|
Posted by :
Archive Import (box) at 22:24 on Sunday, April 27, 2003
|
oh thank you. thank you. so simple. so useful. so required.
oYo -- public bicycle.
| |
Posted by :
Archive Import (Jeff) at 13:18 on Monday, April 28, 2003
|
Doesn't work for me!
Response object error 'ASP 0156 : 80004005'
Header Error
/csc/ShowQuery.asp, line 16
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
| |
Posted by :
Archive Import (david) at 02:35 on Tuesday, April 29, 2003
|
Hi Jeff- you need to set response.buffer=true at the beginning of the page that should solve it
| |
Posted by :
Archive Import (Simon) at 04:43 on Tuesday, May 27, 2003
|
Hey !! It's doesn't work for me too.
Microsoft OLE DB Provider for ODBC Drivers '0x80004005'
[MERANT][ODBC Oracle 8 driver]Optional feature not implemented.
line: 16
| |
Posted by :
Archive Import (Kumaran) at 11:24 on Monday, June 02, 2003
|
Great Coding, I have some script already but thanks for sharing....
KlassiCs
| |
|
|
Posted by :
Archive Import (Jorge Segarra-Rovira) at 10:27 on Tuesday, July 01, 2003
|
I keep getting the following error, anyone help me out?
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/jtest/Query.asp, line 38
The database is located in fpdb/testform3.mdb and in the customizing of code i put "dsn=fpdb/testform3.mdb", I've tried all sorts of changing around only to get same error. Anyone help me out?
| |
Posted by :
Archive Import (Jorge Segarra-Rovira) at 15:14 on Tuesday, July 01, 2003
|
Thanks to a friend changing around some code, specifically:
<%
Sub ShowStructure()
dim objConn,objRs
dim fld,totrec
set objConn=server.CreateObject("ADODB.Connection")
set objRs=server.CreateObject("ADODB.Recordset")
strCon = "DBQ=" & Server.Mappath("fpdb/testform3.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};"
'edit this line with your odbc connection details (can be access or SQL server)
objConn.Open strCon
'objConn.Open strCon
**note: instead of dsn he went with dbq and stated specific driver
Now this code works very nicely, thank you Jeff!
| |
|
|
Posted by :
Archive Import (Parth) at 06:05 on Thursday, July 31, 2003
|
Hello Friends,
This code is really very good.
But my problem is different. I have created one local web in my office. In that I have created date wise reports. In date wise report user can view their data bye entering starting date to ending date. For that they have to enter dates. So I accept dates from user and used SQL query for between dates. but its not working.
So any body have better suggestion for this problem …..
| |
|
|
|
|
Posted by :
Archive Import (anand ) at 12:07 on Thursday, September 18, 2003
|
I am new to databases. So please can anyone tell how to do the whole thing, that is where to upload the ASP code and how to add the ODBC connection string. If you can send me a step by step procedure, it will be very helpful to me. Looking forward to hear from you ppl.
regards,
anand
| |
Posted by :
pathak at 00:58 on Wednesday, March 03, 2004
|
i have this problem that i havent been able to solve for almost a week now.....
i am designing this SQL server backend & ASP frontend software....
how do i update several fields at a time concurrently from the ASP??? the update query needs a primary key for the row to be selected but that primary key is being generated by SQL server as a counter.....so i am just defining the variable where this primary key is being stored. <%=rs(call_id))%> call_id being 1,2,3... upon generation
how do i select attributes pertaining to a particular call_id so that i make changes in that row upon pressing the save button?
| |
Posted by :
jkarthik2k1 at 00:29 on Friday, June 01, 2007
|
Wow this is the code i was looking for.......great help.......thanks a ton
| |
|
To post comments you need to become a member. If you are already a member, please log in .
| |