navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Type mismatch: '[string: "Y"]'

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Type mismatch: '[string: "Y"]'
Page: [1]
 
a04014

 

Posts: 1
Joined: 11/11/2005
Status: offline

 
Type mismatch: '[string: "Y"]' - 11/11/2005 14:46:07   
i get this error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "Y"]'

/PICKLER/cm/delay_info_cm.asp, line 154

I think its because i was using an array to get data from database that was 1's and 0's and now i am looking for Y'S and N'S. How do i change the code to make up for this? Thanks ...Here is the line where the problem occurs : If RecSet(BreakDownHandle)("stand_" & stand & "_affected") Then


But here is the code:
Dim DelayInfoHandle


InfoTableCode = InfoTableCode & "<table border=""0"" width=""800""><tr><td width=""80"">Start</td><td width=""80"">End</td><td width=""80"">Duration (Mins)</td><td width=100>Stands Ch.</td><td width=200>Description</td><td width=100>Responsible</td></tr>"

DelayInfoHandle = RunQuery("ColdMillProduction", "C:\Inetpub\wwwroot\pickler\SQL\cmprodelayinfoquery.SQL", ParamList)

If RecSet(DelayInfoHandle).BOF And RecSet(DelayInfoHandle).EOF Then
InfoTableCode = InfoTableCode & "<tr><td colspan=""5""><p align=""center"">No delays for " & CurrentDate & " Turn " & CurrentTurn & ".</td></tr></table>"
Else
Dim StandsHandle
Dim BreakDownHandle

Dim StandsChanged
Dim Description
Dim stand 'Counter for the stand number
Dim seqNum 'The key which is used to store things in the StandsChanged and Description dictionaries. It is formed from
'concatenating the date, turn, and sequence number

'Key: Turn Date & Turn & Sequence, Item: Description of delays
Set Description = Server.CreateObject("Scripting.Dictionary")


'Key: TurnDate & Turn & Sequence, Item: Description of delays
Set StandsChanged = Server.CreateObject("Scripting.Dictionary")

'Stores all breakdown info at once because it is faster to store it all now than query for it only when we need it
BreakDownHandle = RunQuery("ColdMillProduction", "C:\Inetpub\wwwroot\pickler\SQL\cmproDelayBreakdownQuery.sql", ParamList)
While Not RecSet(BreakDownHandle).EOF
seqNum = Cstr(CurrentDate & CurrentTurn & RecSet(BreakDownHandle)("sequence"))

If Description.Exists(seqNum) Then
Description(seqNum) = Description(seqNum) & "<br>" & Trim(RecSet(BreakDownHandle)("DELAY_REASON_DEF"))
Else
Description.Add seqNum, Trim(RecSet(BreakDownHandle)("DELAY_REASON_DEF"))
End If

If Trim(RecSet(BreakDownHandle)("EVENT_COMMENT")) <> "" Then
Description(seqNum) = Description(seqNum) & "-" & Trim(RecSet(BreakDownHandle)("EVENT_COMMENT"))
End If

For stand = 1 to 5
If RecSet(BreakDownHandle)("stand_" & stand & "_affected") Then
Description(seqNum) = Description(seqNum) & ", " & stand
End If

Next
RecSet(BreakDownHandle).MoveNext
'If Not RecSet(BreakDownHandle).EOF Then
'Description(seqNum) = Description(seqNum) & VbCrLf
Wend
CloseRS(BreakDownHandle)

'Stores all stands changed info at once, for the same reason as the Breakdown info
StandsHandle = RunQuery("ColdMillProduction", "C:\Inetpub\wwwroot\pickler\SQL\cmproDelayStandsQuery.sql", ParamList)
While Not RecSet(StandsHandle).EOF
seqNum = CSTR(CurrentDate & CurrentTurn & RecSet(StandsHandle)("sequence"))

If RecSet(StandsHandle)("WR_CHANGED_SFLAG") Or RecSet(StandsHandle)("TOP_BUR_CHANGED_SFLAG") Or RecSet(StandsHandle)("BOT_BUR_CHANGED_SFLAG") Then
If StandsChanged.Exists(seqNum) Then
StandsChanged(seqNum) = StandsChanged(seqNum) & ", " & RecSet(StandsHandle)("stand_num")
Else
StandsChanged(seqNum) = StandsChanged(seqNum) & RecSet(StandsHandle)("stand_num")
End If

End If
RecSet(StandsHandle).MoveNext
Wend
CloseRS(StandsHandle)




rdouglass

 

Posts: 9206
From: Biddeford, ME USA
Status: offline

 
RE: Type mismatch: '[string: "Y"]' - 11/11/2005 16:07:21   
quote:

For stand = 1 to 5
If RecSet(BreakDownHandle)("stand_" & stand & "_affected") Then
Description(seqNum) = Description(seqNum) & ", " & stand
End If


So is field "stand_" & stand & "_affected" a true/false field? Have you tried:

If RecSet(BreakDownHandle)("stand_" & stand & "_affected") = 1 Then

Or maybe I'm not reading the question properly....

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to a04014)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Type mismatch: '[string: "Y"]'
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts