VBScript runtime error '800a01f5'

A

Amateur

Dear Sirs
Normally my page is running OK, but sometimes I'll get the following error
message (most of the time in the evening). I am working with an ISP.

Microsoft VBScript runtime error '800a01f5'

Illegal assignment: 'QU'

globalsub.asp, line 15

Can someone be as nice as to tell me:
a) what does this 'QU' mean and whatfore ist it there?
b) how can I get rid of this error message.

I have to tell that my ASP pages are done with the ATAF program (with some
adjustments from our site).
Here is a part of the Globalsub quote (including line 15):

<%
Response.Buffer = True
Response.expiresAbsolute=Now()-10
Response.expires=0
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"


Dim CR
Dim LF
Dim CrLf
CR=Chr(13)
LF=Chr(10)
CrLf=Chr(13)+Chr(10)
QU = Chr(34)
Qs = Chr(39)

Function FillFromDb(Tablename, Fieldname)
Set connFillFromDb = server.CreateObject("adodb.Connection")
connFillFromDb.Open
"dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
Sqlstr = "SELECT " + Fieldname + " FROM "+ Tablename
Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
TmpStr = ""
While rsFillFromDb.EOF <> True
If isnull(rsFillFromDb(Fieldname)) <> true then
TmpStr = TmpStr + CStr(Trim(rsFillFromDb(Fieldname))) + ";"
End if
rsFillFromDb.MoveNext
Wend
FillFromDb = Mid(TmpStr, 1, Len(TmpStr)+1)
rsFillFromDb.Close
connFillFromDb.Close
End Function

Function CreateSelectWithKey(Tablename, Fieldname, Keyname, ataffieldname,
curvalue, defaultvalue, sizeofbox, style)
Set connFillFromDb = server.CreateObject("adodb.Connection")
connFillFromDb.Open
"dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
Sqlstr = "SELECT " + Fieldname +"," +Keyname+" From " + Tablename
Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
TmpStr = ""
TmpStr = "<select "+style+" size="+qu+ sizeofbox +qu+" name="
+qu+ataffieldname+qu+ ">"+ Crlf
If curvalue="" Then curvalue=defaultvalue
While rsFillFromDb.EOF <> True
If isnull(rsFillFromDb(Keyname)) <> true then
If CStr(Trim(rsFillFromDb(Keyname)))=curvalue Then
TmpStr = TmpStr +"<option selected
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
Else
TmpStr = TmpStr +"<option
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
End if
End if
rsFillFromDb.MoveNext
Wend
CreateSelectWithKey = TmpStr+"</select>"+Crlf
rsFillFromDb.Close
connFillFromDb.Close
End Function
 
S

Stefan B Rusynko

a) QU = Chr(34)
- assigns the quote (") as chr(34) to QU
b) Add QU as a defined variable
Dim QU

Same probably needs to be done to all other undefined variables if using Option Explicit

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Dear Sirs
| Normally my page is running OK, but sometimes I'll get the following error
| message (most of the time in the evening). I am working with an ISP.
|
| Microsoft VBScript runtime error '800a01f5'
|
| Illegal assignment: 'QU'
|
| globalsub.asp, line 15
|
| Can someone be as nice as to tell me:
| a) what does this 'QU' mean and whatfore ist it there?
| b) how can I get rid of this error message.
|
| I have to tell that my ASP pages are done with the ATAF program (with some
| adjustments from our site).
| Here is a part of the Globalsub quote (including line 15):
|
| <%
| Response.Buffer = True
| Response.expiresAbsolute=Now()-10
| Response.expires=0
| Response.addHeader "pragma","no-cache"
| Response.addHeader "cache-control","private"
|
|
| Dim CR
| Dim LF
| Dim CrLf
| CR=Chr(13)
| LF=Chr(10)
| CrLf=Chr(13)+Chr(10)
| QU = Chr(34)
| Qs = Chr(39)
|
| Function FillFromDb(Tablename, Fieldname)
| Set connFillFromDb = server.CreateObject("adodb.Connection")
| connFillFromDb.Open
| "dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
| Sqlstr = "SELECT " + Fieldname + " FROM "+ Tablename
| Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
| TmpStr = ""
| While rsFillFromDb.EOF <> True
| If isnull(rsFillFromDb(Fieldname)) <> true then
| TmpStr = TmpStr + CStr(Trim(rsFillFromDb(Fieldname))) + ";"
| End if
| rsFillFromDb.MoveNext
| Wend
| FillFromDb = Mid(TmpStr, 1, Len(TmpStr)+1)
| rsFillFromDb.Close
| connFillFromDb.Close
| End Function
|
| Function CreateSelectWithKey(Tablename, Fieldname, Keyname, ataffieldname,
| curvalue, defaultvalue, sizeofbox, style)
| Set connFillFromDb = server.CreateObject("adodb.Connection")
| connFillFromDb.Open
| "dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
| Sqlstr = "SELECT " + Fieldname +"," +Keyname+" From " + Tablename
| Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
| TmpStr = ""
| TmpStr = "<select "+style+" size="+qu+ sizeofbox +qu+" name="
| +qu+ataffieldname+qu+ ">"+ Crlf
| If curvalue="" Then curvalue=defaultvalue
| While rsFillFromDb.EOF <> True
| If isnull(rsFillFromDb(Keyname)) <> true then
| If CStr(Trim(rsFillFromDb(Keyname)))=curvalue Then
| TmpStr = TmpStr +"<option selected
| value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
| Else
| TmpStr = TmpStr +"<option
| value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
| End if
| End if
| rsFillFromDb.MoveNext
| Wend
| CreateSelectWithKey = TmpStr+"</select>"+Crlf
| rsFillFromDb.Close
| connFillFromDb.Close
| End Function
|
|
 
A

Amateur

After changing I receive the following error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

globalsub.asp, line 1

OPTION EXPLICIT

My code looks now like this:

<@Language="VBScript"%>
<% OPTION EXPLICIT %>
Response.Buffer = True
Response.expiresAbsolute=Now()-10
Response.expires=0
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"


Dim CR
Dim LF
Dim CrLf
Dim QU
Dim Qs
CR=Chr(13)
LF=Chr(10)
CrLf=Chr(13)+Chr(10)
QU = Chr(34)
Qs = Chr(39)

Function FillFromDb(Tablename, Fieldname)
Set connFillFromDb = server.CreateObject("adodb.Connection")
connFillFromDb.Open
"dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
Sqlstr = "SELECT " + Fieldname + " FROM "+ Tablename
Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
TmpStr = ""
While rsFillFromDb.EOF <> True
If isnull(rsFillFromDb(Fieldname)) <> true then
TmpStr = TmpStr + CStr(Trim(rsFillFromDb(Fieldname))) + ";"
End if
rsFillFromDb.MoveNext
Wend
FillFromDb = Mid(TmpStr, 1, Len(TmpStr)+1)
rsFillFromDb.Close
connFillFromDb.Close
End Function

Function CreateSelectWithKey(Tablename, Fieldname, Keyname, ataffieldname,
curvalue, defaultvalue, sizeofbox, style)
Set connFillFromDb = server.CreateObject("adodb.Connection")
connFillFromDb.Open
"dsn=access;database=f:\www.bellfield-barna.com\data\transferdb.mdb"
Sqlstr = "SELECT " + Fieldname +"," +Keyname+" From " + Tablename
Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
TmpStr = ""
TmpStr = "<select "+style+" size="+qu+ sizeofbox +qu+" name="
+qu+ataffieldname+qu+ ">"+ Crlf
If curvalue="" Then curvalue=defaultvalue
While rsFillFromDb.EOF <> True
If isnull(rsFillFromDb(Keyname)) <> true then
If CStr(Trim(rsFillFromDb(Keyname)))=curvalue Then
TmpStr = TmpStr +"<option selected
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
Else
TmpStr = TmpStr +"<option
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
End if
End if

What did I do now again wrong? Can someone tell me?
Thanks Klaus

Stefan B Rusynko said:
a) QU = Chr(34)
- assigns the quote (") as chr(34) to QU
b) Add QU as a defined variable
Dim QU

Same probably needs to be done to all other undefined variables if using Option Explicit

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Dear Sirs
| Normally my page is running OK, but sometimes I'll get the following error
| message (most of the time in the evening). I am working with an ISP.
|
| Microsoft VBScript runtime error '800a01f5'
|
| Illegal assignment: 'QU'
|
| globalsub.asp, line 15
|
| Can someone be as nice as to tell me:
| a) what does this 'QU' mean and whatfore ist it there?
| b) how can I get rid of this error message.
|
| I have to tell that my ASP pages are done with the ATAF program (with some
| adjustments from our site).
| Here is a part of the Globalsub quote (including line 15):
|
| <%
| Response.Buffer = True
| Response.expiresAbsolute=Now()-10
| Response.expires=0
| Response.addHeader "pragma","no-cache"
| Response.addHeader "cache-control","private"
|
|
| Dim CR
| Dim LF
| Dim CrLf
| CR=Chr(13)
| LF=Chr(10)
| CrLf=Chr(13)+Chr(10)
| QU = Chr(34)
| Qs = Chr(39)
|
| Function FillFromDb(Tablename, Fieldname)
| Set connFillFromDb = server.CreateObject("adodb.Connection")
| connFillFromDb.Open
| "dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
| Sqlstr = "SELECT " + Fieldname + " FROM "+ Tablename
| Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
| TmpStr = ""
| While rsFillFromDb.EOF <> True
| If isnull(rsFillFromDb(Fieldname)) <> true then
| TmpStr = TmpStr + CStr(Trim(rsFillFromDb(Fieldname))) + ";"
| End if
| rsFillFromDb.MoveNext
| Wend
| FillFromDb = Mid(TmpStr, 1, Len(TmpStr)+1)
| rsFillFromDb.Close
| connFillFromDb.Close
| End Function
|
| Function CreateSelectWithKey(Tablename, Fieldname, Keyname, ataffieldname,
| curvalue, defaultvalue, sizeofbox, style)
| Set connFillFromDb = server.CreateObject("adodb.Connection")
| connFillFromDb.Open
| "dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
| Sqlstr = "SELECT " + Fieldname +"," +Keyname+" From " + Tablename
| Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
| TmpStr = ""
| TmpStr = "<select "+style+" size="+qu+ sizeofbox +qu+" name="
| +qu+ataffieldname+qu+ ">"+ Crlf
| If curvalue="" Then curvalue=defaultvalue
| While rsFillFromDb.EOF <> True
| If isnull(rsFillFromDb(Keyname)) <> true then
| If CStr(Trim(rsFillFromDb(Keyname)))=curvalue Then
| TmpStr = TmpStr +"<option selected
| value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
| Else
| TmpStr = TmpStr +"<option
| value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
| End if
| End if
| rsFillFromDb.MoveNext
| Wend
| CreateSelectWithKey = TmpStr+"</select>"+Crlf
| rsFillFromDb.Close
| connFillFromDb.Close
| End Function
|
|
 
D

David Berry

After the Option Explicit you forgot to put a <% for the next lines of code.
Should look like

<@Language="VBScript"%>
<% OPTION EXPLICIT %>

<%


Response.Buffer = True
Response.expiresAbsolute=Now()-10
Response.expires=0
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"





Amateur said:
After changing I receive the following error message:
Microsoft VBScript compilation error '800a0400'

Expected statement

globalsub.asp, line 1

OPTION EXPLICIT

My code looks now like this:

<@Language="VBScript"%>
<% OPTION EXPLICIT %>
Response.Buffer = True
Response.expiresAbsolute=Now()-10
Response.expires=0
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"


Dim CR
Dim LF
Dim CrLf
Dim QU
Dim Qs
CR=Chr(13)
LF=Chr(10)
CrLf=Chr(13)+Chr(10)
QU = Chr(34)
Qs = Chr(39)

Function FillFromDb(Tablename, Fieldname)
Set connFillFromDb = server.CreateObject("adodb.Connection")
connFillFromDb.Open
"dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
Sqlstr = "SELECT " + Fieldname + " FROM "+ Tablename
Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
TmpStr = ""
While rsFillFromDb.EOF <> True
If isnull(rsFillFromDb(Fieldname)) <> true then
TmpStr = TmpStr + CStr(Trim(rsFillFromDb(Fieldname))) + ";"
End if
rsFillFromDb.MoveNext
Wend
FillFromDb = Mid(TmpStr, 1, Len(TmpStr)+1)
rsFillFromDb.Close
connFillFromDb.Close
End Function

Function CreateSelectWithKey(Tablename, Fieldname, Keyname, ataffieldname,
curvalue, defaultvalue, sizeofbox, style)
Set connFillFromDb = server.CreateObject("adodb.Connection")
connFillFromDb.Open
"dsn=access;database=f:\www.bellfield-barna.com\data\transferdb.mdb"
Sqlstr = "SELECT " + Fieldname +"," +Keyname+" From " + Tablename
Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
TmpStr = ""
TmpStr = "<select "+style+" size="+qu+ sizeofbox +qu+" name="
+qu+ataffieldname+qu+ ">"+ Crlf
If curvalue="" Then curvalue=defaultvalue
While rsFillFromDb.EOF <> True
If isnull(rsFillFromDb(Keyname)) <> true then
If CStr(Trim(rsFillFromDb(Keyname)))=curvalue Then
TmpStr = TmpStr +"<option selected
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
Else
TmpStr = TmpStr +"<option
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
End if
End if

What did I do now again wrong? Can someone tell me?
Thanks Klaus

Stefan B Rusynko said:
a) QU = Chr(34)
- assigns the quote (") as chr(34) to QU
b) Add QU as a defined variable
Dim QU

Same probably needs to be done to all other undefined variables if using
Option Explicit

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| Dear Sirs
| Normally my page is running OK, but sometimes I'll get the following
error
| message (most of the time in the evening). I am working with an ISP.
|
| Microsoft VBScript runtime error '800a01f5'
|
| Illegal assignment: 'QU'
|
| globalsub.asp, line 15
|
| Can someone be as nice as to tell me:
| a) what does this 'QU' mean and whatfore ist it there?
| b) how can I get rid of this error message.
|
| I have to tell that my ASP pages are done with the ATAF program (with
some
| adjustments from our site).
| Here is a part of the Globalsub quote (including line 15):
|
| <%
| Response.Buffer = True
| Response.expiresAbsolute=Now()-10
| Response.expires=0
| Response.addHeader "pragma","no-cache"
| Response.addHeader "cache-control","private"
|
|
| Dim CR
| Dim LF
| Dim CrLf
| CR=Chr(13)
| LF=Chr(10)
| CrLf=Chr(13)+Chr(10)
| QU = Chr(34)
| Qs = Chr(39)
|
| Function FillFromDb(Tablename, Fieldname)
| Set connFillFromDb = server.CreateObject("adodb.Connection")
| connFillFromDb.Open
| "dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
| Sqlstr = "SELECT " + Fieldname + " FROM "+ Tablename
| Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
| TmpStr = ""
| While rsFillFromDb.EOF <> True
| If isnull(rsFillFromDb(Fieldname)) <> true then
| TmpStr = TmpStr + CStr(Trim(rsFillFromDb(Fieldname))) + ";"
| End if
| rsFillFromDb.MoveNext
| Wend
| FillFromDb = Mid(TmpStr, 1, Len(TmpStr)+1)
| rsFillFromDb.Close
| connFillFromDb.Close
| End Function
|
| Function CreateSelectWithKey(Tablename, Fieldname, Keyname,
ataffieldname,
| curvalue, defaultvalue, sizeofbox, style)
| Set connFillFromDb = server.CreateObject("adodb.Connection")
| connFillFromDb.Open
| "dsn=access;database=f:\www.XXXXXXX.com\data\transferdb.mdb"
| Sqlstr = "SELECT " + Fieldname +"," +Keyname+" From " + Tablename
| Set rsFillFromDb = connFillFromDb.Execute(Sqlstr)
| TmpStr = ""
| TmpStr = "<select "+style+" size="+qu+ sizeofbox +qu+" name="
| +qu+ataffieldname+qu+ ">"+ Crlf
| If curvalue="" Then curvalue=defaultvalue
| While rsFillFromDb.EOF <> True
| If isnull(rsFillFromDb(Keyname)) <> true then
| If CStr(Trim(rsFillFromDb(Keyname)))=curvalue Then
| TmpStr = TmpStr +"<option selected
|
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
| Else
| TmpStr = TmpStr +"<option
|
value="+qu+Trim(CStr(rsFillFromDb(Keyname)))+qu+">"+Trim(CStr(rsFillFromDb(Fieldname)))+"</option>"+Crlf
| End if
| End if
| rsFillFromDb.MoveNext
| Wend
| CreateSelectWithKey = TmpStr+"</select>"+Crlf
| rsFillFromDb.Close
| connFillFromDb.Close
| End Function
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top