This is my first visit here. I need help with connection to access db from vbscript, I will appreciate any clues! This is my code:
connStr = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\Users\Gregory\Documents\db1.accdb"
set conn = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
conn.Open connStr
rs.CursorType = adOpenStatic
rs.Open "SELECT username FROM User", conn
I should also add that there is just one table in the database, called "User" and it's got three fields: username, password and realName.
Useris a reserved word in SQL. Try using[]around the table name:select username from [User]