Forum Moderators: open
var rsNews = Server.CreateObject("ADODB.Recordset");
rsNews.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("database/obrien.mdb")
rsNews.Source = "SELECT * FROM tbNews ORDER BY newsDate DESC";
rsNews.CursorType = 0;
rsNews.CursorLocation = 2;
rsNews.LockType = 1;
rsNews.Open();
the page is in the root folder, and the database is in a folder called database, so i'm sure the path is right. i'm getting the 'Arguments are of the wrong type' error. this is the first time ive created a dsnless connection and it sdriving me crazy!
many thanks
- D
If you're using a SQL Server database, the connection string will be different.
Have you tried talking to the support people at your hosting company?
i changed the '&' into '+'. i guess vbscript uses the '&' symbol. Anyway, thats why it wasnt working. thanks for the feedback.
- D
i know this is beacuse the database folder needs to have write permissions, but the read-only check box (when i right-click on teh folder)is greyed out, and when i go to the security settings, the account has got full control, but the error still occurs. any ideas?
- D
I'm no expert on this, but learned something by banging my head against the wall for a long time.
Perhaps someone else who knows more may post here with a better suggestion. Believe me, though, I do know what you're going through.