Forum Moderators: open

Message Too Old, No Replies

Microsoft VBScript compilation error '800a0401'

         

PanPal

5:59 am on Nov 2, 2006 (gmt 0)

10+ Year Member



Having trouble fixing this error. I have changed the name of a field in my Access database, and even though I have updated the field name everywhere, still cannot get this to work.

The problem is on a page that opens its recordset on another page and references it. The offending line is this:
var rsQrySearchData_total = rsQrySearchData.RecordCount;

And it draws a line that points to the semi-colon. This is basically the first line where it references the recordset from the other page.

I didn't design this page, and my background is databases, not ASP, so if you have any thoughts, suspicions or questions, please let me know.

Thanks.

txbakers

12:30 pm on Nov 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you might be using a keyword as your database field. Access doesn't like that.

bmcgee

8:16 pm on Nov 3, 2006 (gmt 0)

10+ Year Member



The semicolon is not valid VBscript syntax (it is Javascript).

I don't believe VBS allows you to declare a variable and assign it on one line like JS either.

var rsQrySearchData_total
rsQrySearchData_total = rsQrySearchData.RecordCount

DWarp9

9:19 pm on Nov 5, 2006 (gmt 0)

10+ Year Member



Besides, in asp you don't declare variables using var (that's java and php), but using dim (or in case you don't use option explicit, there is no need to declare it at all (though it is a good habit)).

Easy_Coder

9:24 pm on Nov 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



its possible that PanPal is using server side jscript.

bmcgee

12:32 am on Nov 6, 2006 (gmt 0)

10+ Year Member



Correct, "var" should have been "dim" in my code sample.

The OP is using VBScript, else he wouldn't get a VBScript error as stated in the topic.