I am getting a non-declaration error in this code.
Line 23: If Not Page.IsPostBack Then
Line 24: cmbY.DataSource = rsFirehose("SELECT LeagueTypeKey, LeagueTypeDescription FROM LeagueType " & _**
Line 25: "WHERE LeagueTypeKey=0 or (Appkey=" & glngAppKey & " AND LeagueTypeKey IN (SELECT Distinct YKey FROM " & _
Line 26: "Division WHERE DivisionTypeKey=" & soaDivisionTypeBracket & ")) ORDER BY LeagueTypeDescription")
Line 24 is where the error is: it says that the name "cmbY" is not declared. How do I declare it?
To correct this error
1.Check the spelling of the control
2.Check the scope of the element
3.Check the member access operator
If you post your code then we can find it very well...so post your code
Related
Microsoft 365 V2205, build 15225.20204
The following VBA macro used to work, and it still works when run manually. A couple of years ago, I am guessing that a change from Microsoft occurred, and it now returns the error code "an unexpected error has occurred" when Outlook automatically runs it. Can someone show me a fix for the rule/VBA that will allow the rule/VBA to:
On an incoming email
Mark it as high importance
Update the subject
Set a category “Bill”
Set a reminder
Here is the:
Rules description
Apply this rule after the message arrives
With ‘Your credit card statement is ready’ or ‘Your statement is ready for credit card ending’
And on this computer only
Mark it as high importance
And run Damian.PendingPaid1
Here is the VBA:
Sub PendingPaid1(Item As Outlook.MailItem)
Item.Categories = "Bill"
Item.Subject = Item.Subject & " " & Chr(150) & " Pending " & Chr(150) & " PAID " & Chr(150) & " 220"
Item.ReminderSet = True
Item.FlagDueBy = Date + 1 & Space(1) & "8:45 AM" ' Remind 1 day from now.
Item.ReminderTime = Date + 1 & Space(1) & "8:45 AM" ' Remind 1 day from now.
Item.Save
End Sub
I want to use AutoIT to access a Maria DB via ADODB objects.
The creation of the ADODB.Connection object seems to work properly. But for some reason I cannot find, the open method fails. I am no AutoIT expert, but to me it does not look like the object had problems with the arguments.
The relevant lines of the code are:
$objConn = ObjCreate("ADODB.Connection")
ConsoleWrite("ADODB conn Error: " & #error & " - Typ: " & VarGetType($objConn) & #crlf)
$objConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword)
ConsoleWrite("conn Error: " & #error & #crlf)
The second ConsoleWrite is not reached. The Output and error-message are:
ADODB conn Error: 0 - Typ: Object
"C:\Users\mischneider\Documents\Automation_Base\udf\mysql.au3" (29) : ==> The requested action with this object has failed.:
$objConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" &
$sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword) $objConn^ ERROR
Can anyone tell what I'm doing wrong and how I can open the connection?
Many thanks in advance,
Michael
I found the reason of and could resolve the problem.
My custom function took $sDriver with following (wrong) default value:
[...]$sDriver = "(MySQL ODBC 3.51 Driver)", [...]
where parentheses () instead of braces {} were used. Correct is:
[...]$sDriver = "{MySQL ODBC 3.51 Driver}", [...]
The laptop screen is so small I didn't realize that. But inserting a working Connection string and then comparing it to the result of the concatenation char by char, I recognized the difference.
I hope this now documented accident will help others in my situation.
BR
Michael
I'm trying to run this line xdmp:unquote(concat('<info>', string( $paragraph) , '</info>')) but I've got the following error: xdmp:unquote("<info>LEARNING & MEMORY</info>") -- Invalid entity reference " " at line 1. It seems like this entity reference & is causing the problem. I tried to remove it using replace function but it still present. What should I do?
I am assuming that you have something like this-
let $paragraph := <p>LEARNING & MEMORY</p>
return
xdmp:unquote(fn:concat('<info>', fn:string($paragraph),'</info>'))
And that the result you want is XML that looks like-
<info>LEARNING & MEMORY</info>
The ampersand is definitely the issue and the workaround is to use the "repair-full" option. This example works:
let $paragraph := <p>LEARNING & MEMORY</p>
let $contents := xdmp:unquote($paragraph, "", "repair-full")
return
<info>{$contents}</info>
I'm stuck working on an old project created with classic ASP (VBScript).
I've found the dictionary collection type which seems to be what I need. However, it keeps telling me "This key is already associated with an element of this collection." when I try to load it from a database recordset.
Here is the code.
set objRS = objDBConn.Execute("SELECT AreaAbbrev, Area FROM tblArea WHERE CompanyID = 15")
Set areaDict = CreateObject("scripting.dictionary")
areaDict.CompareMode=vbTextCompare
WHILE NOT objRS.EOF
Response.Write(objRS("AreaAbbrev") & " ::: " & objRS("Area") & "<br />")
areaDict.add objRS("AreaAbbrev"), objRS("Area")
objRS.movenext
WEND
This is the output:
00K ::: Kellogg
00G ::: Girdler
Microsoft VBScript runtime error '800a01c9'
This key is already associated with an element of this collection
As you can see, "00G" is not the same as "00K". Can anyone tell me why this may be giving me this error?
Thanks!
After some further research, I found adding .Value in this line fixed the issue:
areaDict.add objRS("AreaAbbrev").Value, objRS("Area").Value
I'm new in ASP development.
This is my source code :
ident = request.Form("ident")
pass=request.Form("passe")
response.write(ident)
response.write(pass)
if pass= "m" and ident="m" Then
Session("connect")="membre"
response.redirect("../")
else if pass= "g" and ident="g" Then
Session("connect")="gest"
response.redirect("../")
else if pass= "a" and ident="a" Then
Session("connect")="admin"
response.redirect("../")
else
response.redirect("ident.asp")
End If
But, with this code, I get this :
"Erreur de compilation Microsoft VBScript error '800a0401'
Fin d'instruction attendue
/iisHelp/common/500-100.asp, line 11
Dim objASPError, blnErrorWritten, strServername, strServerIP,
strRemoteIP Dim strMethod, lngPos, datNow, strQueryString, strURL
--------------------------------------------------------------------------^
Erreur de compilation Microsoft VBScript error '800a03f6'
'End' attendu
/groupe2/stage23/TP3/verif_id.asp, line 18 "
Else If in VB must be written in one word, without whitespace separator – ElseIf.
VBScript Else if Statement
must be elseif or ElseIf (without space)
if pass= "m" and ident="m" Then
Session("connect")="membre"
response.redirect("../")
elseif pass= "g" and ident="g" Then
Session("connect")="gest"
response.redirect("../")
elseif pass= "a" and ident="a" Then
Session("connect")="admin"
response.redirect("../")
else
response.redirect("ident.asp")
End If
It looks like earlier in your file -- line 11 -- you've accidentally deleted a newline that's making DIM statements collide. This is throwing the whole file out of synch in the parser.
Split that one line DIM statement into two lines (or kill the second DIM -- your choice) and see if that fixes your problem.