Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Connection

Status
Not open for further replies.

alehawk

Programmer
Jun 18, 2003
332
AR
Hi!
I made a wbsite and I am migrating from access mdb to sql db.
I imported all the DB in the sql under P1A database. What I dont know how to do is hwo do I make the connection.
I used this one to conect to one of the 3 Access DB I had. (all three are merged under P1A in my SQL Personal Edition)

MM_datos_STRING = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("../db/datos.mdb")

What is the new conenction string?
Tnx!
 
Try something like this:

oConn_Str= "Driver={SQL Server};" & _
"Server=MyServerName;" & _
"Database=myDatabaseName;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"


-L
 
The host provider must give me the server name?
 
Most hosting providers giving you an DSN string to connect to.
 
tnx for your help! I tryed and it works, what I cant read is a memo row ut thats other thing.! tnx
 
memo's will appear to be null on checking them like :
if rs("memofield") <> "" then
will act as if the field is null, try putting the content of the memo into a variable then test against the variable, more reliable.

thisvar = rs("memofield")
if thisvar <> "" then
dothis = replace(Rs("memofield"),"whatever","however")
end if

Field type text in SQL can act like a memo field if you need something of that nature.


[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top