Jump to content

Make and set a data base server in XP


khadem1386

Recommended Posts

HiI have a asp file and want check to my camputer in offline:This is a part of my code:pr=server.MapPath("/data.mdb")set objConn = server.CreateObject("ADODB.connection") objConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};"&"DBQ="& pr '/ objConn.Open I want use Data Sources (ODBC) in Administrative Tools in XP and set and run it.can help me how to use this XP server. as IISMy file work to server but I want check it by my pc offlinethank for your help

Link to comment
Share on other sites

First, if you want to run ASP, you need to have IIS installed. You install IIS on XP through the Control Panel, by going to Add/Remove Programs, and Add/Remove Windows Components. I assume you know that you set up an ODBC source in the Data Sources in Admin Tools. What are you having problems with?

Link to comment
Share on other sites

I can use IIs and run all of ASP file to my XP(localhost) but if this file contain some database command it must use and setup data source in My admin to read a mdb file by asp in my XP and test it several time my asp then uploade it and my mdb to real server.my problem is using this comand to localhost: pr=server.MapPath("data.mdb") set objConn = server.CreateObject("ADODB.connection") objConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};"&"DBQ="& pr '/ objConn.Open set objRS = Server.CreateObject("ADODB.Recordset")

Link to comment
Share on other sites

This is just an example... hope this helps....In real, I actually use an #include file to store database connection settings, then write the SQL statement before the HTML tag, and store the SQL replies inside HTML body.<% Dim Svr, CS Svr = "SERVER=" & dbsvrname & "\" & dbhomename & "; " CS = "Driver={SQL Server}; " & Svr & "UID=" & dbusername & "; " & "PWD=" & dbpassword & "; " & "DATABASE=" & dbname Dim oC set oC = Server.CreateObject("ADODB.connection") oC.open CS Dim SQL_1, oRS_1 SQL_1 = "select * from INBOX " set oRS_1 = Server.CreateObject("ADODB.recordset") oRS_1.open SQL_1, oC%><html><body><% do while not oRS_1.EOF%> <li><%=oRS_1("MAIL_DATE")%>, <%=oRS_1("MAIL_FROM")%>, subject: <%=oRS_1("MAIL_SUBJET")%><% oRS_1.movenext loop%></body></html>

Link to comment
Share on other sites

my problem is using this comand to localhost: pr=server.MapPath("data.mdb") set objConn = server.CreateObject("ADODB.connection") objConn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};"&"DBQ="& pr '/ objConn.Open set objRS = Server.CreateObject("ADODB.Recordset")
What is the problem?
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...