June 14, 2009 at 6:22 pm
Here is the problem.
I am building an application that will run in my browser (IE7) that will access a database running under sql server 2005 express. The application is written in ASP and VBScript. I am an old unix guy so what I don't know how to do is set up sql server so I can access it from the application I am building. Everything resides on my PC. What do I need to do or where can I get the information to get the commands or what ever I need to get this done.
Any help I can get would be greatly appreciated.
June 14, 2009 at 8:25 pm
you need to install sql server express edition on ur windows box, create a database, database objects(tables/views/sps) and then start using it.
from your application, you need to connect to the database you created and then fire queries as per your requirement.
In VB 6.0, i used adodb.connection to connect to the database and store the results of the queries in adodb.recordset objects.
If you need help in firing SQL Commands, BOL(Books Online0 is the best place to get started with.
June 15, 2009 at 2:25 am
Agreed.
The way I've done it in the past using standard ASP pages is to create an application variable in the Global.asa file to hold the connection string, then create a connection in the ASP page using the app variable as the connection string
Application("YourApp_ConnectionString") = "DRIVER={SQL Server};SERVER=localhost;DATABASE=dbname;UID=xxx;PWD=yyy"
set dbconn = server.createobject("adodb.connection")
dbconn.open (application("YourApp_ConnectionString"))
set result = server.createobject("adodb.recordset")
...and so on
The above will and does work. Having said that, I'm not primarily a programmer, so if I've made any glaring errors here, no doubt someone'll highlight them.
Is there any particular reason, though, why you're using ASP pages instead of ASP .Net?
Semper in excretia, suus solum profundum variat
June 17, 2009 at 3:04 am
Hi, you can get a lot of documentation about ASP/ASP .NET, but here you have the MS starter kits and a simple application in ASP .Net:
http://www.asp.net/community/projects/
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=27
ASP is the front-end for your SQL server like the management studio. BBDDs, users, permissions, connections, all are very similar.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply