|
-
Jul 14th, 2001, 05:29 AM
#1
Thread Starter
Lively Member
Connecting to a database with UltraDev
Hi All,
I'm having a little trouble connecting to a database in ultra dev with a DNSless connection.
My webhost in its FAQ section says that this is how I should connect to the DB..
<code>
<%Dim Conn, RS
Set Conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")
DSNName = "DRIVER=Microsoft Access Driver (*.mdb);DBQ="
DSNName = DSNName & Server.MapPath("/USERNAME/database/mydatabase.mdb")
Conn.Open DSNName
sql = "SELECT * FROM [TableName] WHERE (((TableName.FieldName)='Value'))"
RS.Open sql, Conn, 3, 3%>
</code>
I have tried using this code in my connection string in UltraDev but it won't work. (note I have also made the changes to the username and my database name, and iam using an access DB).
Does anybody know what possibly could be wrong, any suggestions would be greatly appreciated.
Regards,
Smithy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|