|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Why?
when I'm using my asp pages and the databases in my localhost that work but in my online website which I buyed
I got error thats not work are there is common problem or I'm the first????????????? that got problem in my database in the website?????????????????? and how to fix that I'm sure I m choosed to enable the active server page in my package THANKS YOU !! ![]() |
|
#2
|
||||
|
||||
|
What's the error?
__________________
................... ASCII and ye shall receive .................. Knowledge is the only resource on earth that multiplies when shared Support the Shemzilla Project Powered by C# |
|
#3
|
||||
|
||||
|
this has nothing to do with your host.
something with your code is wrong. yes there are some common problems when moving servers, one of the most common is database connection: you have to get proper connection string sample from your host and then change your connection string in the ASP code. |
|
#4
|
|||
|
|||
|
Quote:
can you tell me how to change my connection string to my database to work in the website ? |
|
#5
|
|||
|
|||
|
Quote:
do you mean to change this ? Code:
<%
Set adoCon = Server.CreateObject("ADODB.Connection")
src = Server.MapPath("db/login.mdb")
sConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & src
adoCon.Open sConnStr
%>
|
|
#6
|
||||
|
||||
|
you first have to locate your connection string.
you can find it in the line of code where you Open the connection, e.g. Code:
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "something comes here"
change the "something come here" and you change the connection string. |
|
#7
|
||||
|
||||
|
yes in your case this is the connection string.
it expects the database file to be located in folder "db" and be named "login.mdb" and it also try to use OLEDB drivers - not all hosts will have such drivers available. what error you get when using this code? |
![]() |
| Viewing: ASP Free Forums > Web Design > Windows Web Hosting > Why? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|