Random error message!

Random error message!

am 15.02.2005 11:18:55 von dan

This is a multi-part message in MIME format.
--------------090909080404070204050806
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Im pretty new to asp, but this just isn't right no matter what lang you use.

I had a website that i was working on. hosted and designed on my laptop.
(xp home w/ iis)

This site was working perfectly when i left it. well not complete yet,
but the major functionality was done, and there were no error messages.

I just turned my laptop on today, and suddenly asp starts complaining.

Microsoft VBScript compilation (0x800A0415)
Expected literal constant
/MPC/website/phonebook/adoArgs.inc, line 22, column 75
server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS & ";"
note: DBLOCATION and DBPASS are both const and declared right before this.


Why would it complain about this now, but not before?? Did i maybe tweek
something w/ iis or anything else to get it to work and need to do that
again???? Im really lost...

I have attatched the file in question: AdoArgs.inc.

I swear i didn't touch the code at all!!. I doubt that windows has some
sort of built-in cvs system. but could the system data possibly effect
this? My bios battery is dead, and need to adjust the date and time w/
every reboot.


Thanks!

--------------090909080404070204050806
Content-Type: text/plain;
name="adoArgs.inc"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="adoArgs.inc"

<%

const adOpenForwardOnly = 0
const adOpenKeyset = 1
const adOpenDynamic = 2
const adOpenStatic = 3

const adLockReadOnly = 1
const adLockPessimistic = 2
const adLockOptimistic = 3

const adCmdText = 1
const adCmdTable = 2
const adCmdStoredProc = 4
const adCmdUnknown = 8
const adCmdTableDirect = 512

const DBPASS = "Qwerty"
const DBLOCATION = "\db\MPCphonebook.mdb"

const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS & ";"

%>
--------------090909080404070204050806--

Re: Random error message!

am 15.02.2005 11:34:44 von John Blessing

"Dan" wrote in message
news:1113jkt9a8lvvf8@corp.supernews.com...
> Im pretty new to asp, but this just isn't right no matter what lang you
> use.
>
> I had a website that i was working on. hosted and designed on my laptop.
> (xp home w/ iis)
>
> This site was working perfectly when i left it. well not complete yet,
> but the major functionality was done, and there were no error messages.
>
> I just turned my laptop on today, and suddenly asp starts complaining.
>
> Microsoft VBScript compilation (0x800A0415)
> Expected literal constant
> /MPC/website/phonebook/adoArgs.inc, line 22, column 75
> server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS &
> ";"
> note: DBLOCATION and DBPASS are both const and declared right before this.
>
>
> Why would it complain about this now, but not before?? Did i maybe tweek
> something w/ iis or anything else to get it to work and need to do that
> again???? Im really lost...
>
> I have attatched the file in question: AdoArgs.inc.
>
> I swear i didn't touch the code at all!!. I doubt that windows has some
> sort of built-in cvs system. but could the system data possibly effect
> this? My bios battery is dead, and need to adjust the date and time w/
> every reboot.
>
>
> Thanks!
>


> <%
>
> const adOpenForwardOnly = 0
> const adOpenKeyset = 1
> const adOpenDynamic = 2
> const adOpenStatic = 3
>
> const adLockReadOnly = 1
> const adLockPessimistic = 2
> const adLockOptimistic = 3
>
> const adCmdText = 1
> const adCmdTable = 2
> const adCmdStoredProc = 4
> const adCmdUnknown = 8
> const adCmdTableDirect = 512
>
> const DBPASS = "Qwerty"
> const DBLOCATION = "\db\MPCphonebook.mdb"
>
> const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
> server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS
> & ";"
>
> %>

You need to do a

response.write strConnString

to see what the connection string looks like.

One thing to bear in mind is the possibility that windows update (if you
have it set to automatically download and install) may have affected iis.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook


------------------------------------------------------------ --------------------

Re: Random error message!

am 15.02.2005 11:46:57 von dan

John Blessing wrote:
> "Dan" wrote in message
> news:1113jkt9a8lvvf8@corp.supernews.com...
>
>>Im pretty new to asp, but this just isn't right no matter what lang you
>>use.
>>
>>I had a website that i was working on. hosted and designed on my laptop.
>>(xp home w/ iis)
>>
>>This site was working perfectly when i left it. well not complete yet,
>>but the major functionality was done, and there were no error messages.
>>
>>I just turned my laptop on today, and suddenly asp starts complaining.
>>
>>Microsoft VBScript compilation (0x800A0415)
>>Expected literal constant
>>/MPC/website/phonebook/adoArgs.inc, line 22, column 75
>>server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS &
>>";"
>>note: DBLOCATION and DBPASS are both const and declared right before this.
>>
>>
>>Why would it complain about this now, but not before?? Did i maybe tweek
>>something w/ iis or anything else to get it to work and need to do that
>>again???? Im really lost...
>>
>>I have attatched the file in question: AdoArgs.inc.
>>
>>I swear i didn't touch the code at all!!. I doubt that windows has some
>>sort of built-in cvs system. but could the system data possibly effect
>>this? My bios battery is dead, and need to adjust the date and time w/
>>every reboot.
>>
>>
>>Thanks!
>>
>
>
>
>><%
>>
>>const adOpenForwardOnly = 0
>>const adOpenKeyset = 1
>>const adOpenDynamic = 2
>>const adOpenStatic = 3
>>
>>const adLockReadOnly = 1
>>const adLockPessimistic = 2
>>const adLockOptimistic = 3
>>
>>const adCmdText = 1
>>const adCmdTable = 2
>>const adCmdStoredProc = 4
>>const adCmdUnknown = 8
>>const adCmdTableDirect = 512
>>
>>const DBPASS = "Qwerty"
>>const DBLOCATION = "\db\MPCphonebook.mdb"
>>
>>const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
>> server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS
>>& ";"
>>
>>%>
>
>
> You need to do a
>
> response.write strConnString
>
> to see what the connection string looks like.
>
> One thing to bear in mind is the possibility that windows update (if you
> have it set to automatically download and install) may have affected iis.
>

hmm.. interesting.. I checked the windows update log file and sure
enough it said it updated on "2/12/2001".. The date my laptop sets back
to when the battery dies.. although i can't really bee sure that was
just now, as it has been that date many times before :)

i fixed the date, rebooted, and trying to do windows update now.

Re: Random error message!

am 15.02.2005 12:16:47 von nntp

"John Blessing" wrote in message
news:37e1i5F5d2o4kU1@individual.net...
> "Dan" wrote in message
> news:1113jkt9a8lvvf8@corp.supernews.com...
> > Im pretty new to asp, but this just isn't right no matter what lang you
> > use.
> >
> > I had a website that i was working on. hosted and designed on my laptop.
> > (xp home w/ iis)
> >
> > This site was working perfectly when i left it. well not complete yet,
> > but the major functionality was done, and there were no error messages.
> >
> > I just turned my laptop on today, and suddenly asp starts complaining.
> >
> > Microsoft VBScript compilation (0x800A0415)
> > Expected literal constant
> > /MPC/website/phonebook/adoArgs.inc, line 22, column 75
> > server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS &
> > ";"
> > note: DBLOCATION and DBPASS are both const and declared right before
this.
> >
> >
> > Why would it complain about this now, but not before?? Did i maybe tweek
> > something w/ iis or anything else to get it to work and need to do that
> > again???? Im really lost...
> >
> > I have attatched the file in question: AdoArgs.inc.
> >
> > I swear i didn't touch the code at all!!. I doubt that windows has some
> > sort of built-in cvs system. but could the system data possibly effect
> > this? My bios battery is dead, and need to adjust the date and time w/
> > every reboot.
> >
> >
> > Thanks!
> >
>
>
> > <%
> >
> > const adOpenForwardOnly = 0
> > const adOpenKeyset = 1
> > const adOpenDynamic = 2
> > const adOpenStatic = 3
> >
> > const adLockReadOnly = 1
> > const adLockPessimistic = 2
> > const adLockOptimistic = 3
> >
> > const adCmdText = 1
> > const adCmdTable = 2
> > const adCmdStoredProc = 4
> > const adCmdUnknown = 8
> > const adCmdTableDirect = 512
> >
> > const DBPASS = "Qwerty"
> > const DBLOCATION = "\db\MPCphonebook.mdb"
> >
> > const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
_
> > server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" &
DBPASS
> > & ";"
> >
> > %>
>
> You need to do a
>
> response.write strConnString
>
> to see what the connection string looks like.
>
> One thing to bear in mind is the possibility that windows update (if you
> have it set to automatically download and install) may have affected iis.
>
> --
> John Blessing
>
> http://www.LbeHelpdesk.com - Help Desk software priced to suit all
> businesses
> http://www.room-booking-software.com - Schedule rooms & equipment bookings
> for your meeting/class over the web.
> http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
>
>
> ------------------------------------------------------------ --------------
------
>
>


While thats going.... I tried what you said about doing the response.write,
but it still gave the same error because it wont let me declare
strconnstring as a const... even though the other variables in it are consts
as well....

any ideas as to why this would work before but not now?? I tried changing it
to a public string, but then another part of the page that i havn't touched
in over 2 weeks started bugging out too... i think this is going to just
open up a whole can of worms for me..


Thanks again

Re: Random error message!

am 15.02.2005 12:30:27 von reb01501

Dan wrote:
>const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
> server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS
> & ";"

You cannot construct a constant this way. You have to make it a variable:
dim strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
server.MapPath(DBLOCATION) & ";Jet OLEDB:Database Password=" & DBPASS
& ";"

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Random error message!

am 15.02.2005 12:38:49 von reb01501

Bob Barrows [MVP] wrote:
> Dan wrote:
>> const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
>> Source=" & _ server.MapPath(DBLOCATION) & ";Jet OLEDB:Database
>> Password=" & DBPASS & ";"
>
> You cannot construct a constant this way. You have to make it a
> variable: dim strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=" & _ server.MapPath(DBLOCATION) & ";Jet OLEDB:Database
> Password=" & DBPASS & ";"
>
> Bob Barrows

From vbscript online help:

You can't use variables, user-defined functions, or intrinsic VBScript
functions (such as Chr) in constant declarations. By definition, they can't
be constants. You also can't create a constant from any expression that
involves an operator, that is, only simple constants are allowed.

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Re: Random error message!

am 15.02.2005 13:11:29 von nntp

"Bob Barrows [MVP]" wrote in message
news:u6DHsL1EFHA.2176@TK2MSFTNGP15.phx.gbl...
> Bob Barrows [MVP] wrote:
> > Dan wrote:
> >> const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> >> Source=" & _ server.MapPath(DBLOCATION) & ";Jet OLEDB:Database
> >> Password=" & DBPASS & ";"
> >
> > You cannot construct a constant this way. You have to make it a
> > variable: dim strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> > Source=" & _ server.MapPath(DBLOCATION) & ";Jet OLEDB:Database
> > Password=" & DBPASS & ";"
> >
> > Bob Barrows
>
> From vbscript online help:
>
> You can't use variables, user-defined functions, or intrinsic VBScript
> functions (such as Chr) in constant declarations. By definition, they
can't
> be constants. You also can't create a constant from any expression that
> involves an operator, that is, only simple constants are allowed.
>
> Bob Barrows
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>

Thank you much...
I will begin rewriting portions of my code as soon as my windows update
finishes.
Kinda odd that this just started happening though.... Can't really fathom
how I had it working before...

eh oh well.. better now then later.

Dan

Re: Random error message!

am 16.02.2005 02:11:41 von dan

nntp wrote:
> "Bob Barrows [MVP]" wrote in message
> news:u6DHsL1EFHA.2176@TK2MSFTNGP15.phx.gbl...
>
>>Bob Barrows [MVP] wrote:
>>
>>>Dan wrote:
>>>
>>>>const strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
>>>> Source=" & _ server.MapPath(DBLOCATION) & ";Jet OLEDB:Database
>>>>Password=" & DBPASS & ";"
>>>
>>>You cannot construct a constant this way. You have to make it a
>>>variable: dim strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
>>> Source=" & _ server.MapPath(DBLOCATION) & ";Jet OLEDB:Database
>>>Password=" & DBPASS & ";"
>>>
>>>Bob Barrows
>>
>>From vbscript online help:
>>
>>You can't use variables, user-defined functions, or intrinsic VBScript
>>functions (such as Chr) in constant declarations. By definition, they
>
> can't
>
>>be constants. You also can't create a constant from any expression that
>>involves an operator, that is, only simple constants are allowed.
>>
>>Bob Barrows
>>--
>>Microsoft MVP - ASP/ASP.NET
>>Please reply to the newsgroup. This email account is my spam trap so I
>>don't check it very often. If you must reply off-line, then remove the
>>"NO SPAM"
>>
>>
>
>
> Thank you much...
> I will begin rewriting portions of my code as soon as my windows update
> finishes.
> Kinda odd that this just started happening though.... Can't really fathom
> how I had it working before...
>
> eh oh well.. better now then later.
>
> Dan
>
>


ahhh.. i found the problem... one of my co-workers apperantly moved it
elsewhere then put an old copy in the directory i was looking it.. How
genius i feel...

Thanks to all!

Re: Random error message!

am 16.02.2005 12:09:17 von McKirahan

"Dan" wrote in message
news:1113jkt9a8lvvf8@corp.supernews.com...
> Im pretty new to asp, but this just isn't right no matter what lang you
use.
>
> I had a website that i was working on. hosted and designed on my laptop.
> (xp home w/ iis)


How'd you do that? IIS only comes with XP Pro.