Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-03-2007, 10:08 PM   PM User | #1
bowser3
New to the CF scene

 
Join Date: Sep 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
bowser3 is an unknown quantity at this point
Creating link between access database and website

I have created a website and a search page for my access database - I keep getting the following error message -

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/07site/07site/sept4.asp, line 107

var conn = Server.CreateObject("ADODB.Connection");
--------------------------------------------------^

This is what the code on that line says

</script>
<script language="JavaScript" src="mm_menu.js"></script>

<SCRIPT> <!--
function GetDefinitions() {
window.open("Definitions.asp", "DW", "width=635,height=450,scrollbars");
}
//-->
</SCRIPT>

<%
var conn = Server.CreateObject("ADODB.Connection");
conn.Open ("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" + Server.MapPath(".") + "//Data//Housing.mdb;");

//Category
var rst1 = Server.CreateObject("ADODB.Recordset");
var CategoryRows = 0;
var sCategory = "";
rst1.CursorLocation=Application("CursorLocation.ServerSide");
rst1.CursorType=Application("CursorType.Keyset");
rst1.LockType=Application("LockType.ReadOnly");
var sql = "SELECT ID, Name FROM Category ORDER BY Name";
rst1.Open (sql, conn);
CategoryRows = rst1.RecordCount;


Any suggestions on what to do would be greatly appreciated.

Thanks
bowser3 is offline   Reply With Quote
Old 09-04-2007, 09:45 AM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
I guess that is a VBScript problem, not a javascript one. I might move/copy this thread to a proper Forum.
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:35 AM.


Advertisement
Log in to turn off these ads.