Search the web
Sign In
New User? Sign Up
active-server-pages · Active Server Pages Developers' List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 12382 - 12411 of 12411   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#12411 From: "lhmacfarland" <lhmacfarland@...>
Date: Sat Nov 14, 2009 1:49 am
Subject: Differences between IE 6, 7 and 8
lhmacfarland
Offline Offline
Send Email Send Email
 
I found this link for differences in CSS in IE 6, 7, and 8:
http://www.smashingmagazine.com/2009/10/14/css-differences-in-internet-explorer-\
6-7-and-8/

I did get caught finding IE 6 &  Firefox worked but IE 7 was weird until I did
some stuff. IE 7 doesn't appear to enlarge panels if needed when using .Net
(worked fine in IE 6). Does anyone know if there are other "gotchas" with .Net?

Is there a comparison of different behaviors when using ASP or Javascript? The
company has a standard (IE 6) but is already pushing out the newer versions so
I'd like to be better prepared.

#12410 From: "David Smart" <smartware.consulting@...>
Date: Thu Nov 12, 2009 9:08 pm
Subject: Re: [ASP] Bizarre error '80004005'
smartware_co...
Offline Offline
Send Email Send Email
 
> That may somehow bypass the reserved issue ...

Completely bypasses it.  The reserved issue is for the SQL statement syntax,
not the field names themselves.

Regards, Dave S

----- Original Message -----
From: "Mark E" <meckeard2000@...>
To: <active-server-pages@yahoogroups.com>
Sent: Thursday, November 12, 2009 11:46 PM
Subject: Re: [ASP] Bizarre error '80004005'


That makes sense now. A select * doesn't provide the field names. If I
recall correctly, the DB has to look up the * and convert it to the field
names in your table. That may somehow bypass the reserved issue but not when
you explicitly state the field name that's a reserved word.

Odd but we know that sort of this happens.

Glad you got it fixed.

Mark

--- On Thu, 11/12/09, David Smart <smartware.consulting@...> wrote:


From: David Smart <smartware.consulting@...>
Subject: Re: [ASP] Bizarre error '80004005'
To: active-server-pages@yahoogroups.com
Date: Thursday, November 12, 2009, 5:50 AM






> It still doesn't really explain how a "SELECT *" works, which must be
> pulling up a 'Size' field, whereas "SELECT Size" fails... but who am I to
> question a now-deprecated driver!

No, that's not going to present a problem. The problem is with your use of
the Size keyword in your SQL. The actual returning of the Size field (as
part of the Select *) won't confuse the driver.

This page http://www.petefrei tag.com/tools/ sql_reserved_ words_checker/
can
be used to check whether a word is reserved in several database brands
(although not Access, unfortunately) . "Size" shows as reserved in quite a
few brands, including ISO SQL.

This page http://office. microsoft. com/en-us/ access/hp0103224 91033.aspx
gives
you the Access reserved words.

Regards, Dave S

----- Original Message -----
From: "Graeme" <gnwilson2001@ yahoo.com>
To: <active-server- pages@yahoogroup s.com>
Sent: Thursday, November 12, 2009 8:13 PM
Subject: Re: [ASP] Bizarre error '80004005'

> Thanks Dave, and a thank you to everyone who made suggestions.
>
> The annoying thing for me (aside from the 4-5 hours wasted) was that this
> is legacy code that has been running for 6+ years (and in fact is based on
> code I wrote back in 1999 or so...). I simply moved a few things around
> (in this case turned the building of product sizes into a function), and
> changed to the JET database driver instead of the older Access DB driver.
>
> The solution was in have that field name 'Size' is obviously a reserved
> word in the newer JET driver (I say newer with a bit of a laugh, as I read
> that it is also deprecated now...), whereas it worked fine for many years
> using the Access DB driver. Such is life. And the other day I read through
> a list of reserved words for Access, on a Microsoft website, and I never
> spotted 'Size' as a reserved word...
>
> Anyway, I've renamed this field (which will mean updating several 'live'
> databases out there), and things are running again.
>
> It still doesn't really explain how a "SELECT *" works, which must be
> pulling up a 'Size' field, whereas "SELECT Size" fails... but who am I to
> question a now-deprecated driver!
>
> Thanks again to everyone who made suggestions.
>
> Kind Regards,
> Graeme
>
> --- In active-server- pages@yahoogroup s.com, "David Smart"
> <smartware.consulti ng@...> wrote:
>>
>> > ... If I "SELECT *" it works, but it I try to selected a named field.
>> > e.g. "SELECT Code FROM..." then it immediately bombs,
>> > so therefore not related to the "WHERE" clause.
>>
>> I don't think I've ever seen a situation where Select * works but a
>> Select
>> with named fields does not. It really does sound as though your SQL
>> syntax
>> is getting confused when you start specifying fields.
>>
>> Do look carefully at the generated SQL - particularly for missing spaces.
>>
>> However, also try other combinations of field names. Your example was
>> "SELECT Code". Now "Code" is one of those words that is just as likely
>> to
>> be considered a key word. It might be that the DB interface - which DB
>> by
>> the way? - is objecting to a particular word being used as a field name.
>>
>> Ones that leap to my eye as possible keywords are "Size" and particularly
>> "Code". Try doing a select for fields with less "key wordish" names to
>> see
>> if they can be selected OK.
>>
>> (In fact, "Code" and "Size" aren't particularly good column names anyway,
>> IMHO. You should be more specific in column naming, e.g. CatalogueCode,
>> ContainerSize, or whatever.)
>>
>> Regards, Dave S
>>
>> PS This "false keyword" situation is not uncommon and is an instance in
>> which you'll get success though the DB's SQL window and failure from ASP,
>> etc. It should become the first thing to check once you find that your
>> SQL
>> works fine when submitted in the immediate window, but not via ASP.
>>
>> ----- Original Message -----
>> From: "Graeme" <gnwilson2001@ ...>
>> To: <active-server- pages@yahoogroup s.com>
>> Sent: Wednesday, November 11, 2009 6:01 AM
>> Subject: Re: [ASP] Bizarre error '80004005'
>>
>>
>> > Thanks for all the suggestions. Unfortunately it isn't related to any
>> > of
>> > the parts you guys have suggested. If I "SELECT *" it works, but it I
>> > try
>> > to selected a named field. e.g. "SELECT Code FROM..." then it
>> > immediately
>> > bombs, so therefore not related to the "WHERE" clause.
>> >
>> > I spent 4 hours last night trying every combination to get through,
>> > trying
>> > different values for cursor types etc, and nothing. The only 'fix' was
>> > the
>> > SELECT *, which doesn't really do what I want.
>> >
>> > The only other option I found related to '80004005' is to do with
>> > permissions of the file/directory, so I may contact my host to double
>> > check these things, but on a read only statement I can't see that a
>> > problem should/could occur... then again, this is Microsoft ;)
>> >
>> > I will probably try re-writing some of my code to try something else...
>> > I
>> > don't know what right now!
>> >
>> > Cheers,
>> > Graeme
>> >
>> > --- In active-server- pages@yahoogroup s.com, "VisioMVP" <VisioMVP@>
>> > wrote:
>> >>
>> >> Try stepping through the code and see what the value for strSQL is
>> >> when
>> >> you
>> >> are about to run the objRecordset. Open statement.
>> >>
>> >>
>> >>
>> >> John. Visio MVP
>> >>
>> >>
>> >>
>> >> From: active-server- pages@yahoogroup s.com
>> >> [mailto:active-server- pages@yahoogroup s.com] On Behalf Of Graeme
>> >> Sent: November-10- 09 4:46 AM
>> >> To: active-server- pages@yahoogroup s.com
>> >> Subject: [ASP] Bizarre error '80004005'
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Hi all,
>> >>
>> >> Well, this error has really got me stumped. There is no additional
>> >> information other than: error '80004005' (not even the ever 'useful'
>> >> Unspecified Error)
>> >>
>> >> The piece of code causing the problem is:
>> >>
>> >> Function BuildSize(strPCode, curPrice)
>> >>
>> >> Set objRecordset = Server.CreateObject ("ADODB.Recordse t")
>> >>
>> >> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
>> >> ExtendedDelivery, POA"
>> >> strSQL = strSQL & " FROM tblProducts"
>> >> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) &
>> >> "'
>> >> AND Price=" & CStr(curPrice)
>> >> strSQL = strSQL & " ORDER BY Size;"
>> >>
>> >> objRecordset. Open strSQL, DB_ConnectionString , adOpenForwardOnly,
>> >> adLockReadOnly, adCmdText
>> >>
>> >> ...
>> >>
>> >> End Function
>> >>
>> >> It dies on the "objRecordset. Open" part. The weirdest thing to me is
>> >> that
>> >> if
>> >> I replace the strSQL = "SELECT * FROM tblProducts; " then the error
>> >> disappears (of course it doesn't really provide a solution as to why
>> >> there
>> >> is the error.
>> >>
>> >> Adding ".tblProducts" to the SELECT fields (e.g.
>> >> tblProducts. ProductID)
>> >> doesn't solve the problem.
>> >>
>> >> objRecordset has been used previously, but even if I "Set objRecordset
>> >> =
>> >> Nothing" first, no go. Even if I make a new variable ("Dim
>> >> objRecordset" )
>> >> within this Function, no go. It appears that I'm missing something in
>> >> the
>> >> SQL string, but as I can cut and paste it into an MS Access DB query
>> >> and
>> >> it
>> >> works correctly, I can't see what can possibly be causing the problem!
>> >>
>> >> Any suggestions would be greatly appreciated. This code is adapted
>> >> from
>> >> something I've had online for 6+ years, just updating to
>> >> "Microsoft.Jet. OLEDB.4.0" (which part of the code had been
>> >> overhauled,
>> >> part
>> >> hadn't) ... and so getting a strange error like this is rather
>> >> annoying.
>> >>
>> >> Also, if I cut the code out of the Function, and paste it into the
>> >> main
>> >> code, I get the same error, as does passing hard coded 'variables' for
>> >> strPCode AND curPrice (e.g. replacing them with what the function was
>> >> passing them, e.g. Code='ABC' AND Price=10
>> >>
>> >> Any help would be very much appreciated!
>> >>
>> >> Cheers,
>> >> Graeme
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> [Non-text portions of this message have been removed]
>> >>
>> >
>> >
>> >
>> >
>> > ------------ --------- --------- ------
>> >
>> > ------------ --------- --------- --------- --------- --------- -
>> > Home : http://groups. yahoo.com/ group/active- server-pages
>> > ------------ --------- --------- --------- --------- --------- -
>> > Post : active-server- pages@yahoogroup s.com
>> > Subscribe : active-server- pages-subscribe@ yahoogroups. com
>> > Unsubscribe: active-server- pages-unsubscrib e@yahoogroups. com
>> > ------------ --------- --------- --------- --------- --------- -Yahoo!
>> > Groups Links
>> >
>> >
>> >
>>
>>
>> ------------ --------- --------- --------- --------- --------- -
>>
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 8.5.425 / Virus Database: 270.14.58/2493 - Release Date:
>> 11/09/09
>> 19:40:00
>>
>
>
>
>
> ------------ --------- --------- ------
>
> ------------ --------- --------- --------- --------- --------- -
> Home : http://groups. yahoo.com/ group/active- server-pages
> ------------ --------- --------- --------- --------- --------- -
> Post : active-server- pages@yahoogroup s.com
> Subscribe : active-server- pages-subscribe@ yahoogroups. com
> Unsubscribe: active-server- pages-unsubscrib e@yahoogroups. com
> ------------ --------- --------- --------- --------- --------- -Yahoo!
> Groups Links
>
>
>

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

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.61/2497 - Release Date: 11/11/09
19:41:00








__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

[Non-text portions of this message have been removed]



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

---------------------------------------------------------------------
  Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
  Post       : active-server-pages@yahoogroups.com
  Subscribe  : active-server-pages-subscribe@yahoogroups.com
  Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
---------------------------------------------------------------------Yahoo!
Groups Links





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



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.61/2497 - Release Date: 11/11/09
19:41:00

#12409 From: Mark E <meckeard2000@...>
Date: Thu Nov 12, 2009 12:46 pm
Subject: Re: [ASP] Bizarre error '80004005'
meckeard2000
Offline Offline
Send Email Send Email
 
That makes sense now.  A select * doesn't provide the field names.  If I
recall correctly, the DB has to look up the * and convert it to the field names
in your table.  That may somehow bypass the reserved issue but not when you
explicitly state the field name that's a reserved word.
 
Odd but we know that sort of this happens.
 
Glad you got it fixed.
 
Mark

--- On Thu, 11/12/09, David Smart <smartware.consulting@...> wrote:


From: David Smart <smartware.consulting@...>
Subject: Re: [ASP] Bizarre error '80004005'
To: active-server-pages@yahoogroups.com
Date: Thursday, November 12, 2009, 5:50 AM


 



> It still doesn't really explain how a "SELECT *" works, which must be
> pulling up a 'Size' field, whereas "SELECT Size" fails... but who am I to
> question a now-deprecated driver!

No, that's not going to present a problem. The problem is with your use of
the Size keyword in your SQL. The actual returning of the Size field (as
part of the Select *) won't confuse the driver.

This page http://www.petefrei tag.com/tools/ sql_reserved_ words_checker/ can
be used to check whether a word is reserved in several database brands
(although not Access, unfortunately) . "Size" shows as reserved in quite a
few brands, including ISO SQL.

This page http://office. microsoft. com/en-us/ access/hp0103224 91033.aspx gives
you the Access reserved words.

Regards, Dave S

----- Original Message -----
From: "Graeme" <gnwilson2001@ yahoo.com>
To: <active-server- pages@yahoogroup s.com>
Sent: Thursday, November 12, 2009 8:13 PM
Subject: Re: [ASP] Bizarre error '80004005'

> Thanks Dave, and a thank you to everyone who made suggestions.
>
> The annoying thing for me (aside from the 4-5 hours wasted) was that this
> is legacy code that has been running for 6+ years (and in fact is based on
> code I wrote back in 1999 or so...). I simply moved a few things around
> (in this case turned the building of product sizes into a function), and
> changed to the JET database driver instead of the older Access DB driver.
>
> The solution was in have that field name 'Size' is obviously a reserved
> word in the newer JET driver (I say newer with a bit of a laugh, as I read
> that it is also deprecated now...), whereas it worked fine for many years
> using the Access DB driver. Such is life. And the other day I read through
> a list of reserved words for Access, on a Microsoft website, and I never
> spotted 'Size' as a reserved word...
>
> Anyway, I've renamed this field (which will mean updating several 'live'
> databases out there), and things are running again.
>
> It still doesn't really explain how a "SELECT *" works, which must be
> pulling up a 'Size' field, whereas "SELECT Size" fails... but who am I to
> question a now-deprecated driver!
>
> Thanks again to everyone who made suggestions.
>
> Kind Regards,
> Graeme
>
> --- In active-server- pages@yahoogroup s.com, "David Smart"
> <smartware.consulti ng@...> wrote:
>>
>> > ... If I "SELECT *" it works, but it I try to selected a named field.
>> > e.g. "SELECT Code FROM..." then it immediately bombs,
>> > so therefore not related to the "WHERE" clause.
>>
>> I don't think I've ever seen a situation where Select * works but a
>> Select
>> with named fields does not. It really does sound as though your SQL
>> syntax
>> is getting confused when you start specifying fields.
>>
>> Do look carefully at the generated SQL - particularly for missing spaces.
>>
>> However, also try other combinations of field names. Your example was
>> "SELECT Code". Now "Code" is one of those words that is just as likely
>> to
>> be considered a key word. It might be that the DB interface - which DB
>> by
>> the way? - is objecting to a particular word being used as a field name.
>>
>> Ones that leap to my eye as possible keywords are "Size" and particularly
>> "Code". Try doing a select for fields with less "key wordish" names to
>> see
>> if they can be selected OK.
>>
>> (In fact, "Code" and "Size" aren't particularly good column names anyway,
>> IMHO. You should be more specific in column naming, e.g. CatalogueCode,
>> ContainerSize, or whatever.)
>>
>> Regards, Dave S
>>
>> PS This "false keyword" situation is not uncommon and is an instance in
>> which you'll get success though the DB's SQL window and failure from ASP,
>> etc. It should become the first thing to check once you find that your
>> SQL
>> works fine when submitted in the immediate window, but not via ASP.
>>
>> ----- Original Message -----
>> From: "Graeme" <gnwilson2001@ ...>
>> To: <active-server- pages@yahoogroup s.com>
>> Sent: Wednesday, November 11, 2009 6:01 AM
>> Subject: Re: [ASP] Bizarre error '80004005'
>>
>>
>> > Thanks for all the suggestions. Unfortunately it isn't related to any
>> > of
>> > the parts you guys have suggested. If I "SELECT *" it works, but it I
>> > try
>> > to selected a named field. e.g. "SELECT Code FROM..." then it
>> > immediately
>> > bombs, so therefore not related to the "WHERE" clause.
>> >
>> > I spent 4 hours last night trying every combination to get through,
>> > trying
>> > different values for cursor types etc, and nothing. The only 'fix' was
>> > the
>> > SELECT *, which doesn't really do what I want.
>> >
>> > The only other option I found related to '80004005' is to do with
>> > permissions of the file/directory, so I may contact my host to double
>> > check these things, but on a read only statement I can't see that a
>> > problem should/could occur... then again, this is Microsoft ;)
>> >
>> > I will probably try re-writing some of my code to try something else...
>> > I
>> > don't know what right now!
>> >
>> > Cheers,
>> > Graeme
>> >
>> > --- In active-server- pages@yahoogroup s.com, "VisioMVP" <VisioMVP@>
>> > wrote:
>> >>
>> >> Try stepping through the code and see what the value for strSQL is
>> >> when
>> >> you
>> >> are about to run the objRecordset. Open statement.
>> >>
>> >>
>> >>
>> >> John. Visio MVP
>> >>
>> >>
>> >>
>> >> From: active-server- pages@yahoogroup s.com
>> >> [mailto:active-server- pages@yahoogroup s.com] On Behalf Of Graeme
>> >> Sent: November-10- 09 4:46 AM
>> >> To: active-server- pages@yahoogroup s.com
>> >> Subject: [ASP] Bizarre error '80004005'
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Hi all,
>> >>
>> >> Well, this error has really got me stumped. There is no additional
>> >> information other than: error '80004005' (not even the ever 'useful'
>> >> Unspecified Error)
>> >>
>> >> The piece of code causing the problem is:
>> >>
>> >> Function BuildSize(strPCode, curPrice)
>> >>
>> >> Set objRecordset = Server.CreateObject ("ADODB.Recordse t")
>> >>
>> >> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
>> >> ExtendedDelivery, POA"
>> >> strSQL = strSQL & " FROM tblProducts"
>> >> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) &
>> >> "'
>> >> AND Price=" & CStr(curPrice)
>> >> strSQL = strSQL & " ORDER BY Size;"
>> >>
>> >> objRecordset. Open strSQL, DB_ConnectionString , adOpenForwardOnly,
>> >> adLockReadOnly, adCmdText
>> >>
>> >> ...
>> >>
>> >> End Function
>> >>
>> >> It dies on the "objRecordset. Open" part. The weirdest thing to me is
>> >> that
>> >> if
>> >> I replace the strSQL = "SELECT * FROM tblProducts; " then the error
>> >> disappears (of course it doesn't really provide a solution as to why
>> >> there
>> >> is the error.
>> >>
>> >> Adding ".tblProducts" to the SELECT fields (e.g.
>> >> tblProducts. ProductID)
>> >> doesn't solve the problem.
>> >>
>> >> objRecordset has been used previously, but even if I "Set objRecordset
>> >> =
>> >> Nothing" first, no go. Even if I make a new variable ("Dim
>> >> objRecordset" )
>> >> within this Function, no go. It appears that I'm missing something in
>> >> the
>> >> SQL string, but as I can cut and paste it into an MS Access DB query
>> >> and
>> >> it
>> >> works correctly, I can't see what can possibly be causing the problem!
>> >>
>> >> Any suggestions would be greatly appreciated. This code is adapted
>> >> from
>> >> something I've had online for 6+ years, just updating to
>> >> "Microsoft.Jet. OLEDB.4.0" (which part of the code had been overhauled,
>> >> part
>> >> hadn't) ... and so getting a strange error like this is rather
>> >> annoying.
>> >>
>> >> Also, if I cut the code out of the Function, and paste it into the
>> >> main
>> >> code, I get the same error, as does passing hard coded 'variables' for
>> >> strPCode AND curPrice (e.g. replacing them with what the function was
>> >> passing them, e.g. Code='ABC' AND Price=10
>> >>
>> >> Any help would be very much appreciated!
>> >>
>> >> Cheers,
>> >> Graeme
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> [Non-text portions of this message have been removed]
>> >>
>> >
>> >
>> >
>> >
>> > ------------ --------- --------- ------
>> >
>> > ------------ --------- --------- --------- --------- --------- -
>> > Home : http://groups. yahoo.com/ group/active- server-pages
>> > ------------ --------- --------- --------- --------- --------- -
>> > Post : active-server- pages@yahoogroup s.com
>> > Subscribe : active-server- pages-subscribe@ yahoogroups. com
>> > Unsubscribe: active-server- pages-unsubscrib e@yahoogroups. com
>> > ------------ --------- --------- --------- --------- --------- -Yahoo!
>> > Groups Links
>> >
>> >
>> >
>>
>>
>> ------------ --------- --------- --------- --------- --------- -
>>
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 8.5.425 / Virus Database: 270.14.58/2493 - Release Date:
>> 11/09/09
>> 19:40:00
>>
>
>
>
>
> ------------ --------- --------- ------
>
> ------------ --------- --------- --------- --------- --------- -
> Home : http://groups. yahoo.com/ group/active- server-pages
> ------------ --------- --------- --------- --------- --------- -
> Post : active-server- pages@yahoogroup s.com
> Subscribe : active-server- pages-subscribe@ yahoogroups. com
> Unsubscribe: active-server- pages-unsubscrib e@yahoogroups. com
> ------------ --------- --------- --------- --------- --------- -Yahoo!
> Groups Links
>
>
>

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

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.61/2497 - Release Date: 11/11/09
19:41:00








__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

[Non-text portions of this message have been removed]

#12408 From: "Moshe Tapnack" <elists@...>
Date: Thu Nov 12, 2009 11:22 am
Subject: RE: [ASP] JS undefined request.form
tapnack
Offline Offline
Send Email Send Email
 
Nope – same ol’ IE7 in this case.



-----Original Message-----
From: active-server-pages@yahoogroups.com
[mailto:active-server-pages@yahoogroups.com] On Behalf Of mark wills
Sent: Thursday, November 12, 2009 1:00 PM
To: active-server-pages@yahoogroups.com
Subject: Re: [ASP] JS undefined request.form

Have the client broswers changed? (New browser, or new version of a browser?)

MArk


>
>From: Moshe Tapnack <elists@...>
>To: active-server-pages@yahoogroups.com
>Sent: Thu, 12 November, 2009 11:40:49
>Subject: [ASP] JS undefined request.form
>
> >
>
>
>
>
>  >
>>
>
>Hi folks
>
>>Nice to see some activity here again :-)
>
>>Talking about legacy systems, I have had a system up and running for a few
years, I inherited it from someone. They have a form submitting on a
ASP/Javascript page.
>
>>The form looks like this:
>
>>------------ --------- --------- --------- --------- --------- -
>
>><form method="post" action="registratio n.asp" name="form" id="form">
>
>><table width="410" border="0" align="center" cellpadding= "4" cellspacing=
"0">
>
>><tr class="texto_ nota">
>
>><td>
>
>><div align="right" >Last name:</div>
>
>></td>
>
>><td>
>
>><input type="text" name="lastname" size="60">
>
>></td>
>
>></tr>
>
>><tr class="texto_ nota">
>
>><td>
>
>><div align="right" >First name:</div>
>
>></td>
>
>><td>
>
>><input type="text" name="firstname" size="60">
>
>></td>
>
>></tr></table>
>
>><p>
>
>><input type="submit" id="Submit" name="Submit" value="Submit" >
>
>></p>
>
>></form>
>
>>------------ --------- --------- --------- -------
>
>>And then the ASP:
>
>>if (String(Request( "Submit") ) != "undefined") {
>
>>..bla..
>
>>}
>
>>Now, it always used to do the “bla”, but now suddenly, no matter what, its
taken the value of “submit” as undefined, and thus the “bla” is not
being done. I have tried adding in specifically “.item” and .”form” in
the request line, but nothing seems to work.
>
>>Any ideas?
>
>>Thanks!
>
>>Moshe
>
>>[Non-text portions of this message have been removed]
>
>
>

[Non-text portions of this message have been removed]



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

---------------------------------------------------------------------
  Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
  Post       : active-server-pages@yahoogroups.com
  Subscribe  : active-server-pages-subscribe@yahoogroups.com
  Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
---------------------------------------------------------------------Yahoo!
Groups Links

#12407 From: mark wills <markrobertwills@...>
Date: Thu Nov 12, 2009 10:59 am
Subject: Re: [ASP] JS undefined request.form
markrobertwills
Offline Offline
Send Email Send Email
 
Have the client broswers changed? (New browser, or new version of a browser?)

MArk


>
>From: Moshe Tapnack <elists@...>
>To: active-server-pages@yahoogroups.com
>Sent: Thu, 12 November, 2009 11:40:49
>Subject: [ASP] JS undefined request.form
>
> >
>
>
>
>
>  >
>>
>
>Hi folks
>
>>Nice to see some activity here again :-)
>
>>Talking about legacy systems, I have had a system up and running for a few
years, I inherited it from someone. They have a form submitting on a
ASP/Javascript page.
>
>>The form looks like this:
>
>>------------ --------- --------- --------- --------- --------- -
>
>><form method="post" action="registratio n.asp" name="form" id="form">
>
>><table width="410" border="0" align="center" cellpadding= "4" cellspacing=
"0">
>
>><tr class="texto_ nota">
>
>><td>
>
>><div align="right" >Last name:</div>
>
>></td>
>
>><td>
>
>><input type="text" name="lastname" size="60">
>
>></td>
>
>></tr>
>
>><tr class="texto_ nota">
>
>><td>
>
>><div align="right" >First name:</div>
>
>></td>
>
>><td>
>
>><input type="text" name="firstname" size="60">
>
>></td>
>
>></tr></table>
>
>><p>
>
>><input type="submit" id="Submit" name="Submit" value="Submit" >
>
>></p>
>
>></form>
>
>>------------ --------- --------- --------- -------
>
>>And then the ASP:
>
>>if (String(Request( "Submit") ) != "undefined") {
>
>>..bla..
>
>>}
>
>>Now, it always used to do the “bla”, but now suddenly, no matter what, its
taken the value of “submit” as undefined, and thus the “bla” is not
being done. I have tried adding in specifically “.item” and .”form” in
the request line, but nothing seems to work.
>
>>Any ideas?
>
>>Thanks!
>
>>Moshe
>
>>[Non-text portions of this message have been removed]
>
>
>

[Non-text portions of this message have been removed]

#12406 From: "David Smart" <smartware.consulting@...>
Date: Thu Nov 12, 2009 10:50 am
Subject: Re: [ASP] Bizarre error '80004005'
smartware_co...
Offline Offline
Send Email Send Email
 
> It still doesn't really explain how a "SELECT *" works, which must be
> pulling up a 'Size' field, whereas "SELECT Size" fails... but who am I to
> question a now-deprecated driver!

No, that's not going to present a problem.  The problem is with your use of
the Size keyword in your SQL.  The actual returning of the Size field (as
part of the Select *) won't confuse the driver.

This page http://www.petefreitag.com/tools/sql_reserved_words_checker/ can
be used to check whether a word is reserved in several database brands
(although not Access, unfortunately).  "Size" shows as reserved in quite a
few brands, including ISO SQL.

This page http://office.microsoft.com/en-us/access/hp010322491033.aspx gives
you the Access reserved words.

Regards, Dave S

----- Original Message -----
From: "Graeme" <gnwilson2001@...>
To: <active-server-pages@yahoogroups.com>
Sent: Thursday, November 12, 2009 8:13 PM
Subject: Re: [ASP] Bizarre error '80004005'


> Thanks Dave, and a thank you to everyone who made suggestions.
>
> The annoying thing for me (aside from the 4-5 hours wasted) was that this
> is legacy code that has been running for 6+ years (and in fact is based on
> code I wrote back in 1999 or so...). I simply moved a few things around
> (in this case turned the building of product sizes into a function), and
> changed to the JET database driver instead of the older Access DB driver.
>
> The solution was in have that field name 'Size' is obviously a reserved
> word in the newer JET driver (I say newer with a bit of a laugh, as I read
> that it is also deprecated now...), whereas it worked fine for many years
> using the Access DB driver. Such is life. And the other day I read through
> a list of reserved words for Access, on a Microsoft website, and I never
> spotted 'Size' as a reserved word...
>
> Anyway, I've renamed this field (which will mean updating several 'live'
> databases out there), and things are running again.
>
> It still doesn't really explain how a "SELECT *" works, which must be
> pulling up a 'Size' field, whereas "SELECT Size" fails... but who am I to
> question a now-deprecated driver!
>
> Thanks again to everyone who made suggestions.
>
> Kind Regards,
> Graeme
>
> --- In active-server-pages@yahoogroups.com, "David Smart"
> <smartware.consulting@...> wrote:
>>
>> > ... If I "SELECT *" it works, but it I try to selected a named field.
>> > e.g. "SELECT Code FROM..." then it immediately bombs,
>> > so therefore not related to the "WHERE" clause.
>>
>> I don't think I've ever seen a situation where Select * works but a
>> Select
>> with named fields does not.  It really does sound as though your SQL
>> syntax
>> is getting confused when you start specifying fields.
>>
>> Do look carefully at the generated SQL - particularly for missing spaces.
>>
>> However, also try other combinations of field names.  Your example was
>> "SELECT Code".  Now "Code" is one of those words that is just as likely
>> to
>> be considered a key word.  It might be that the DB interface - which DB
>> by
>> the way? - is objecting to a particular word being used as a field name.
>>
>> Ones that leap to my eye as possible keywords are "Size" and particularly
>> "Code".  Try doing a select for fields with less "key wordish" names to
>> see
>> if they can be selected OK.
>>
>> (In fact, "Code" and "Size" aren't particularly good column names anyway,
>> IMHO.  You should be more specific in column naming, e.g. CatalogueCode,
>> ContainerSize, or whatever.)
>>
>> Regards, Dave S
>>
>> PS  This "false keyword" situation is not uncommon and is an instance in
>> which you'll get success though the DB's SQL window and failure from ASP,
>> etc.  It should become the first thing to check once you find that your
>> SQL
>> works fine when submitted in the immediate window, but not via ASP.
>>
>> ----- Original Message -----
>> From: "Graeme" <gnwilson2001@...>
>> To: <active-server-pages@yahoogroups.com>
>> Sent: Wednesday, November 11, 2009 6:01 AM
>> Subject: Re: [ASP] Bizarre error '80004005'
>>
>>
>> > Thanks for all the suggestions. Unfortunately it isn't related to any
>> > of
>> > the parts you guys have suggested. If I "SELECT *" it works, but it I
>> > try
>> > to selected a named field. e.g. "SELECT Code FROM..." then it
>> > immediately
>> > bombs, so therefore not related to the "WHERE" clause.
>> >
>> > I spent 4 hours last night trying every combination to get through,
>> > trying
>> > different values for cursor types etc, and nothing. The only 'fix' was
>> > the
>> > SELECT *, which doesn't really do what I want.
>> >
>> > The only other option I found related to '80004005' is to do with
>> > permissions of the file/directory, so I may contact my host to double
>> > check these things, but on a read only statement I can't see that a
>> > problem should/could occur... then again, this is Microsoft ;)
>> >
>> > I will probably try re-writing some of my code to try something else...
>> > I
>> > don't know what right now!
>> >
>> > Cheers,
>> > Graeme
>> >
>> > --- In active-server-pages@yahoogroups.com, "VisioMVP" <VisioMVP@>
>> > wrote:
>> >>
>> >> Try stepping through the code and see what the value for strSQL is
>> >> when
>> >> you
>> >> are about to run the objRecordset.Open statement.
>> >>
>> >>
>> >>
>> >> John.   Visio MVP
>> >>
>> >>
>> >>
>> >> From: active-server-pages@yahoogroups.com
>> >> [mailto:active-server-pages@yahoogroups.com] On Behalf Of Graeme
>> >> Sent: November-10-09 4:46 AM
>> >> To: active-server-pages@yahoogroups.com
>> >> Subject: [ASP] Bizarre error '80004005'
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Hi all,
>> >>
>> >> Well, this error has really got me stumped. There is no additional
>> >> information other than: error '80004005' (not even the ever 'useful'
>> >> Unspecified Error)
>> >>
>> >> The piece of code causing the problem is:
>> >>
>> >> Function BuildSize(strPCode, curPrice)
>> >>
>> >> Set objRecordset = Server.CreateObject("ADODB.Recordset")
>> >>
>> >> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
>> >> ExtendedDelivery, POA"
>> >> strSQL = strSQL & " FROM tblProducts"
>> >> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) &
>> >> "'
>> >> AND Price=" & CStr(curPrice)
>> >> strSQL = strSQL & " ORDER BY Size;"
>> >>
>> >> objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
>> >> adLockReadOnly, adCmdText
>> >>
>> >> ...
>> >>
>> >> End Function
>> >>
>> >> It dies on the "objRecordset.Open" part. The weirdest thing to me is
>> >> that
>> >> if
>> >> I replace the strSQL = "SELECT * FROM tblProducts;" then the error
>> >> disappears (of course it doesn't really provide a solution as to why
>> >> there
>> >> is the error.
>> >>
>> >> Adding ".tblProducts" to the SELECT fields (e.g.
>> >> tblProducts.ProductID)
>> >> doesn't solve the problem.
>> >>
>> >> objRecordset has been used previously, but even if I "Set objRecordset
>> >> =
>> >> Nothing" first, no go. Even if I make a new variable ("Dim
>> >> objRecordset")
>> >> within this Function, no go. It appears that I'm missing something in
>> >> the
>> >> SQL string, but as I can cut and paste it into an MS Access DB query
>> >> and
>> >> it
>> >> works correctly, I can't see what can possibly be causing the problem!
>> >>
>> >> Any suggestions would be greatly appreciated. This code is adapted
>> >> from
>> >> something I've had online for 6+ years, just updating to
>> >> "Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled,
>> >> part
>> >> hadn't) ... and so getting a strange error like this is rather
>> >> annoying.
>> >>
>> >> Also, if I cut the code out of the Function, and paste it into the
>> >> main
>> >> code, I get the same error, as does passing hard coded 'variables' for
>> >> strPCode AND curPrice (e.g. replacing them with what the function was
>> >> passing them, e.g. Code='ABC' AND Price=10
>> >>
>> >> Any help would be very much appreciated!
>> >>
>> >> Cheers,
>> >> Graeme
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> [Non-text portions of this message have been removed]
>> >>
>> >
>> >
>> >
>> >
>> > ------------------------------------
>> >
>> > ---------------------------------------------------------------------
>> > Home       : http://groups.yahoo.com/group/active-server-pages
>> > ---------------------------------------------------------------------
>> > Post       : active-server-pages@yahoogroups.com
>> > Subscribe  : active-server-pages-subscribe@yahoogroups.com
>> > Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
>> > ---------------------------------------------------------------------Yahoo!
>> > Groups Links
>> >
>> >
>> >
>>
>>
>>
--------------------------------------------------------------------------------
>>
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 8.5.425 / Virus Database: 270.14.58/2493 - Release Date:
>> 11/09/09
>> 19:40:00
>>
>
>
>
>
> ------------------------------------
>
> ---------------------------------------------------------------------
> Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post       : active-server-pages@yahoogroups.com
> Subscribe  : active-server-pages-subscribe@yahoogroups.com
> Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
> ---------------------------------------------------------------------Yahoo!
> Groups Links
>
>
>


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



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.61/2497 - Release Date: 11/11/09
19:41:00

#12405 From: "Moshe Tapnack" <elists@...>
Date: Thu Nov 12, 2009 10:40 am
Subject: JS undefined request.form
tapnack
Offline Offline
Send Email Send Email
 
Hi folks



Nice to see some activity here again :-)



Talking about legacy systems, I have had a system up and running for a few
years, I inherited it from someone. They have a form submitting on a
ASP/Javascript page.





The form looks like this:

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

<form method="post" action="registration.asp" name="form" id="form">

<table width="410" border="0" align="center" cellpadding="4" cellspacing="0">

     <tr class="texto_nota">

       <td>

         <div align="right">Last name:</div>

       </td>

       <td>

         <input type="text" name="lastname" size="60">

       </td>

     </tr>

     <tr class="texto_nota">

       <td>

         <div align="right">First name:</div>

       </td>

       <td>

         <input type="text" name="firstname" size="60">

       </td>

     </tr></table>

<p>

     <input type="submit" id="Submit" name="Submit" value="Submit">

   </p>

</form>



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

And then the ASP:



if (String(Request("Submit")) != "undefined"){



..bla..

}



Now, it always used to do the “bla”, but now suddenly, no matter what, its
taken the value of “submit” as undefined, and thus the “bla” is not
being done. I have tried adding in specifically “.item” and .”form” in
the request line, but nothing seems to work.



Any ideas?



Thanks!

Moshe





[Non-text portions of this message have been removed]

#12404 From: "Graeme" <gnwilson2001@...>
Date: Thu Nov 12, 2009 9:13 am
Subject: Re: [ASP] Bizarre error '80004005'
gnwilson2001
Offline Offline
Send Email Send Email
 
Thanks Dave, and a thank you to everyone who made suggestions.

The annoying thing for me (aside from the 4-5 hours wasted) was that this is
legacy code that has been running for 6+ years (and in fact is based on code I
wrote back in 1999 or so...). I simply moved a few things around (in this case
turned the building of product sizes into a function), and changed to the JET
database driver instead of the older Access DB driver.

The solution was in have that field name 'Size' is obviously a reserved word in
the newer JET driver (I say newer with a bit of a laugh, as I read that it is
also deprecated now...), whereas it worked fine for many years using the Access
DB driver. Such is life. And the other day I read through a list of reserved
words for Access, on a Microsoft website, and I never spotted 'Size' as a
reserved word...

Anyway, I've renamed this field (which will mean updating several 'live'
databases out there), and things are running again.

It still doesn't really explain how a "SELECT *" works, which must be pulling up
a 'Size' field, whereas "SELECT Size" fails... but who am I to question a
now-deprecated driver!

Thanks again to everyone who made suggestions.

Kind Regards,
Graeme

--- In active-server-pages@yahoogroups.com, "David Smart"
<smartware.consulting@...> wrote:
>
> > ... If I "SELECT *" it works, but it I try to selected a named field.
> > e.g. "SELECT Code FROM..." then it immediately bombs,
> > so therefore not related to the "WHERE" clause.
>
> I don't think I've ever seen a situation where Select * works but a Select
> with named fields does not.  It really does sound as though your SQL syntax
> is getting confused when you start specifying fields.
>
> Do look carefully at the generated SQL - particularly for missing spaces.
>
> However, also try other combinations of field names.  Your example was
> "SELECT Code".  Now "Code" is one of those words that is just as likely to
> be considered a key word.  It might be that the DB interface - which DB by
> the way? - is objecting to a particular word being used as a field name.
>
> Ones that leap to my eye as possible keywords are "Size" and particularly
> "Code".  Try doing a select for fields with less "key wordish" names to see
> if they can be selected OK.
>
> (In fact, "Code" and "Size" aren't particularly good column names anyway,
> IMHO.  You should be more specific in column naming, e.g. CatalogueCode,
> ContainerSize, or whatever.)
>
> Regards, Dave S
>
> PS  This "false keyword" situation is not uncommon and is an instance in
> which you'll get success though the DB's SQL window and failure from ASP,
> etc.  It should become the first thing to check once you find that your SQL
> works fine when submitted in the immediate window, but not via ASP.
>
> ----- Original Message -----
> From: "Graeme" <gnwilson2001@...>
> To: <active-server-pages@yahoogroups.com>
> Sent: Wednesday, November 11, 2009 6:01 AM
> Subject: Re: [ASP] Bizarre error '80004005'
>
>
> > Thanks for all the suggestions. Unfortunately it isn't related to any of
> > the parts you guys have suggested. If I "SELECT *" it works, but it I try
> > to selected a named field. e.g. "SELECT Code FROM..." then it immediately
> > bombs, so therefore not related to the "WHERE" clause.
> >
> > I spent 4 hours last night trying every combination to get through, trying
> > different values for cursor types etc, and nothing. The only 'fix' was the
> > SELECT *, which doesn't really do what I want.
> >
> > The only other option I found related to '80004005' is to do with
> > permissions of the file/directory, so I may contact my host to double
> > check these things, but on a read only statement I can't see that a
> > problem should/could occur... then again, this is Microsoft ;)
> >
> > I will probably try re-writing some of my code to try something else... I
> > don't know what right now!
> >
> > Cheers,
> > Graeme
> >
> > --- In active-server-pages@yahoogroups.com, "VisioMVP" <VisioMVP@>
> > wrote:
> >>
> >> Try stepping through the code and see what the value for strSQL is when
> >> you
> >> are about to run the objRecordset.Open statement.
> >>
> >>
> >>
> >> John.   Visio MVP
> >>
> >>
> >>
> >> From: active-server-pages@yahoogroups.com
> >> [mailto:active-server-pages@yahoogroups.com] On Behalf Of Graeme
> >> Sent: November-10-09 4:46 AM
> >> To: active-server-pages@yahoogroups.com
> >> Subject: [ASP] Bizarre error '80004005'
> >>
> >>
> >>
> >>
> >>
> >> Hi all,
> >>
> >> Well, this error has really got me stumped. There is no additional
> >> information other than: error '80004005' (not even the ever 'useful'
> >> Unspecified Error)
> >>
> >> The piece of code causing the problem is:
> >>
> >> Function BuildSize(strPCode, curPrice)
> >>
> >> Set objRecordset = Server.CreateObject("ADODB.Recordset")
> >>
> >> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
> >> ExtendedDelivery, POA"
> >> strSQL = strSQL & " FROM tblProducts"
> >> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "'
> >> AND Price=" & CStr(curPrice)
> >> strSQL = strSQL & " ORDER BY Size;"
> >>
> >> objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
> >> adLockReadOnly, adCmdText
> >>
> >> ...
> >>
> >> End Function
> >>
> >> It dies on the "objRecordset.Open" part. The weirdest thing to me is that
> >> if
> >> I replace the strSQL = "SELECT * FROM tblProducts;" then the error
> >> disappears (of course it doesn't really provide a solution as to why
> >> there
> >> is the error.
> >>
> >> Adding ".tblProducts" to the SELECT fields (e.g. tblProducts.ProductID)
> >> doesn't solve the problem.
> >>
> >> objRecordset has been used previously, but even if I "Set objRecordset =
> >> Nothing" first, no go. Even if I make a new variable ("Dim objRecordset")
> >> within this Function, no go. It appears that I'm missing something in the
> >> SQL string, but as I can cut and paste it into an MS Access DB query and
> >> it
> >> works correctly, I can't see what can possibly be causing the problem!
> >>
> >> Any suggestions would be greatly appreciated. This code is adapted from
> >> something I've had online for 6+ years, just updating to
> >> "Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled,
> >> part
> >> hadn't) ... and so getting a strange error like this is rather annoying.
> >>
> >> Also, if I cut the code out of the Function, and paste it into the main
> >> code, I get the same error, as does passing hard coded 'variables' for
> >> strPCode AND curPrice (e.g. replacing them with what the function was
> >> passing them, e.g. Code='ABC' AND Price=10
> >>
> >> Any help would be very much appreciated!
> >>
> >> Cheers,
> >> Graeme
> >>
> >>
> >>
> >>
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > ---------------------------------------------------------------------
> > Home       : http://groups.yahoo.com/group/active-server-pages
> > ---------------------------------------------------------------------
> > Post       : active-server-pages@yahoogroups.com
> > Subscribe  : active-server-pages-subscribe@yahoogroups.com
> > Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
> > ---------------------------------------------------------------------Yahoo!
> > Groups Links
> >
> >
> >
>
>
>
--------------------------------------------------------------------------------
>
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.5.425 / Virus Database: 270.14.58/2493 - Release Date: 11/09/09
> 19:40:00
>

#12403 From: "David Smart" <smartware.consulting@...>
Date: Tue Nov 10, 2009 9:33 pm
Subject: Re: [ASP] Bizarre error '80004005'
smartware_co...
Offline Offline
Send Email Send Email
 
> ... If I "SELECT *" it works, but it I try to selected a named field.
> e.g. "SELECT Code FROM..." then it immediately bombs,
> so therefore not related to the "WHERE" clause.

I don't think I've ever seen a situation where Select * works but a Select
with named fields does not.  It really does sound as though your SQL syntax
is getting confused when you start specifying fields.

Do look carefully at the generated SQL - particularly for missing spaces.

However, also try other combinations of field names.  Your example was
"SELECT Code".  Now "Code" is one of those words that is just as likely to
be considered a key word.  It might be that the DB interface - which DB by
the way? - is objecting to a particular word being used as a field name.

Ones that leap to my eye as possible keywords are "Size" and particularly
"Code".  Try doing a select for fields with less "key wordish" names to see
if they can be selected OK.

(In fact, "Code" and "Size" aren't particularly good column names anyway,
IMHO.  You should be more specific in column naming, e.g. CatalogueCode,
ContainerSize, or whatever.)

Regards, Dave S

PS  This "false keyword" situation is not uncommon and is an instance in
which you'll get success though the DB's SQL window and failure from ASP,
etc.  It should become the first thing to check once you find that your SQL
works fine when submitted in the immediate window, but not via ASP.

----- Original Message -----
From: "Graeme" <gnwilson2001@...>
To: <active-server-pages@yahoogroups.com>
Sent: Wednesday, November 11, 2009 6:01 AM
Subject: Re: [ASP] Bizarre error '80004005'


> Thanks for all the suggestions. Unfortunately it isn't related to any of
> the parts you guys have suggested. If I "SELECT *" it works, but it I try
> to selected a named field. e.g. "SELECT Code FROM..." then it immediately
> bombs, so therefore not related to the "WHERE" clause.
>
> I spent 4 hours last night trying every combination to get through, trying
> different values for cursor types etc, and nothing. The only 'fix' was the
> SELECT *, which doesn't really do what I want.
>
> The only other option I found related to '80004005' is to do with
> permissions of the file/directory, so I may contact my host to double
> check these things, but on a read only statement I can't see that a
> problem should/could occur... then again, this is Microsoft ;)
>
> I will probably try re-writing some of my code to try something else... I
> don't know what right now!
>
> Cheers,
> Graeme
>
> --- In active-server-pages@yahoogroups.com, "VisioMVP" <VisioMVP@...>
> wrote:
>>
>> Try stepping through the code and see what the value for strSQL is when
>> you
>> are about to run the objRecordset.Open statement.
>>
>>
>>
>> John.   Visio MVP
>>
>>
>>
>> From: active-server-pages@yahoogroups.com
>> [mailto:active-server-pages@yahoogroups.com] On Behalf Of Graeme
>> Sent: November-10-09 4:46 AM
>> To: active-server-pages@yahoogroups.com
>> Subject: [ASP] Bizarre error '80004005'
>>
>>
>>
>>
>>
>> Hi all,
>>
>> Well, this error has really got me stumped. There is no additional
>> information other than: error '80004005' (not even the ever 'useful'
>> Unspecified Error)
>>
>> The piece of code causing the problem is:
>>
>> Function BuildSize(strPCode, curPrice)
>>
>> Set objRecordset = Server.CreateObject("ADODB.Recordset")
>>
>> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
>> ExtendedDelivery, POA"
>> strSQL = strSQL & " FROM tblProducts"
>> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "'
>> AND Price=" & CStr(curPrice)
>> strSQL = strSQL & " ORDER BY Size;"
>>
>> objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
>> adLockReadOnly, adCmdText
>>
>> ...
>>
>> End Function
>>
>> It dies on the "objRecordset.Open" part. The weirdest thing to me is that
>> if
>> I replace the strSQL = "SELECT * FROM tblProducts;" then the error
>> disappears (of course it doesn't really provide a solution as to why
>> there
>> is the error.
>>
>> Adding ".tblProducts" to the SELECT fields (e.g. tblProducts.ProductID)
>> doesn't solve the problem.
>>
>> objRecordset has been used previously, but even if I "Set objRecordset =
>> Nothing" first, no go. Even if I make a new variable ("Dim objRecordset")
>> within this Function, no go. It appears that I'm missing something in the
>> SQL string, but as I can cut and paste it into an MS Access DB query and
>> it
>> works correctly, I can't see what can possibly be causing the problem!
>>
>> Any suggestions would be greatly appreciated. This code is adapted from
>> something I've had online for 6+ years, just updating to
>> "Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled,
>> part
>> hadn't) ... and so getting a strange error like this is rather annoying.
>>
>> Also, if I cut the code out of the Function, and paste it into the main
>> code, I get the same error, as does passing hard coded 'variables' for
>> strPCode AND curPrice (e.g. replacing them with what the function was
>> passing them, e.g. Code='ABC' AND Price=10
>>
>> Any help would be very much appreciated!
>>
>> Cheers,
>> Graeme
>>
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>
>
>
>
> ------------------------------------
>
> ---------------------------------------------------------------------
> Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post       : active-server-pages@yahoogroups.com
> Subscribe  : active-server-pages-subscribe@yahoogroups.com
> Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
> ---------------------------------------------------------------------Yahoo!
> Groups Links
>
>
>


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



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.58/2493 - Release Date: 11/09/09
19:40:00

#12402 From: "David Smart" <smartware.consulting@...>
Date: Tue Nov 10, 2009 9:13 pm
Subject: Re: [ASP] Bizarre error '80004005'
smartware_co...
Offline Offline
Send Email Send Email
 
1) Put a print statement into your code before the Open statement and
display the resultant SQL statement so that there can be no question about
what you're asking the DB engine to do.
2) Copy/paste the SQL statement that gets printed into your DB engine's SQL
window and execute it there to see if it works.
3) Comment out (do not delete) the print statement once everything's
working.

Chances are you'll see something at (1).  If not, then the SQL window in the
DB might give you more error info.

If it works in the DB's SQL window, but not in your code, then you might
have a permissions problem.

If all else fails, post the exact SQL statement here (using copy/paste from
the print statement) when you ask again.

Get in the habit of ALWAYS putting the print statement in before using a
generated SQL statement, and then comment it out once you no longer need it.

(By "print statement", I'm referring to something that will put your SQL
onto your resultant screen and/or into a "view source".  I use a call to a
small subroutine that lives in my common code module.  My "putLine" (in
JScript) looks like this

   function putLine (text)
   {
     putLF (text + "<br>");
   }

where ....

   function putLF (text)
   {
     put (text + "\n");
   }

   function put (text)
   {
     Response.write (text);
   }

This function set causes a Response.write of the text with both a <br> and
an ASCII return appended to it.  The <br> is to end the line when it
actually makes it to the screen; the ASCII return is to end it neatly in a
"view source".)

Regards, Dave S

----- Original Message -----
From: "Graeme" <gnwilson2001@...>
To: <active-server-pages@yahoogroups.com>
Sent: Tuesday, November 10, 2009 8:46 PM
Subject: [ASP] Bizarre error '80004005'


> Hi all,
>
> Well, this error has really got me stumped. There is no additional
> information other than: error '80004005' (not even the ever 'useful'
> Unspecified Error)
>
> The piece of code causing the problem is:
>
> Function BuildSize(strPCode, curPrice)
>
> Set objRecordset = Server.CreateObject("ADODB.Recordset")
>
> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
> ExtendedDelivery, POA"
> strSQL = strSQL & " FROM tblProducts"
> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "'
> AND Price=" & CStr(curPrice)
> strSQL = strSQL & " ORDER BY Size;"
>
> objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
> adLockReadOnly, adCmdText
>
> ...
>
> End Function
>
> It dies on the "objRecordset.Open" part. The weirdest thing to me is that
> if I replace the strSQL = "SELECT * FROM tblProducts;" then the error
> disappears (of course it doesn't really provide a solution as to why there
> is the error.
>
> Adding ".tblProducts" to the SELECT fields (e.g. tblProducts.ProductID)
> doesn't solve the problem.
>
> objRecordset has been used previously, but even if I "Set objRecordset =
> Nothing" first, no go. Even if I make a new variable ("Dim objRecordset")
> within this Function, no go. It appears that I'm missing something in the
> SQL string, but as I can cut and paste it into an MS Access DB query and
> it works correctly, I can't see what can possibly be causing the problem!
>
> Any suggestions would be greatly appreciated. This code is adapted from
> something I've had online for 6+ years, just updating to
> "Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled,
> part hadn't) ... and so getting a strange error like this is rather
> annoying.
>
> Also, if I cut the code out of the Function, and paste it into the main
> code, I get the same error, as does passing hard coded 'variables' for
> strPCode AND curPrice (e.g. replacing them with what the function was
> passing them, e.g. Code='ABC' AND Price=10
>
> Any help would be very much appreciated!
>
> Cheers,
> Graeme
>
>
>
> ------------------------------------
>
> ---------------------------------------------------------------------
> Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post       : active-server-pages@yahoogroups.com
> Subscribe  : active-server-pages-subscribe@yahoogroups.com
> Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
> ---------------------------------------------------------------------Yahoo!
> Groups Links
>
>
>


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



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.425 / Virus Database: 270.14.58/2493 - Release Date: 11/09/09
19:40:00

#12401 From: Mark E <meckeard2000@...>
Date: Tue Nov 10, 2009 7:36 pm
Subject: Re: [ASP] Bizarre error '80004005'
meckeard2000
Offline Offline
Send Email Send Email
 
So your saying this works:
 
select * from tblProducts
 
... but this doesn't?
 
Select ProductID, size from tblProducts?
 
You've completely eliminated the where clause from all examples?
 
I know permissions on the DB could be an issue but I thought being able to do a
"select *" eliminated that from the equation.
 
Mark

--- On Tue, 11/10/09, Graeme <gnwilson2001@...> wrote:


From: Graeme <gnwilson2001@...>
Subject: Re: [ASP] Bizarre error '80004005'
To: active-server-pages@yahoogroups.com
Date: Tuesday, November 10, 2009, 2:01 PM


 



Thanks for all the suggestions. Unfortunately it isn't related to any of the
parts you guys have suggested. If I "SELECT *" it works, but it I try to
selected a named field. e.g. "SELECT Code FROM..." then it immediately bombs, so
therefore not related to the "WHERE" clause.

I spent 4 hours last night trying every combination to get through, trying
different values for cursor types etc, and nothing. The only 'fix' was the
SELECT *, which doesn't really do what I want.

The only other option I found related to '80004005' is to do with permissions of
the file/directory, so I may contact my host to double check these things, but
on a read only statement I can't see that a problem should/could occur... then
again, this is Microsoft ;)

I will probably try re-writing some of my code to try something else... I don't
know what right now!

Cheers,
Graeme

--- In active-server- pages@yahoogroup s.com, "VisioMVP" <VisioMVP@.. .> wrote:
>
> Try stepping through the code and see what the value for strSQL is when you
> are about to run the objRecordset. Open statement.
>
>
>
> John. Visio MVP
>
>
>
> From: active-server- pages@yahoogroup s.com
> [mailto:active-server- pages@yahoogroup s.com] On Behalf Of Graeme
> Sent: November-10- 09 4:46 AM
> To: active-server- pages@yahoogroup s.com
> Subject: [ASP] Bizarre error '80004005'
>
>
>
>
>
> Hi all,
>
> Well, this error has really got me stumped. There is no additional
> information other than: error '80004005' (not even the ever 'useful'
> Unspecified Error)
>
> The piece of code causing the problem is:
>
> Function BuildSize(strPCode, curPrice)
>
> Set objRecordset = Server.CreateObject ("ADODB.Recordse t")
>
> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
> ExtendedDelivery, POA"
> strSQL = strSQL & " FROM tblProducts"
> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "'
> AND Price=" & CStr(curPrice)
> strSQL = strSQL & " ORDER BY Size;"
>
> objRecordset. Open strSQL, DB_ConnectionString , adOpenForwardOnly,
> adLockReadOnly, adCmdText
>
> ...
>
> End Function
>
> It dies on the "objRecordset. Open" part. The weirdest thing to me is that if
> I replace the strSQL = "SELECT * FROM tblProducts; " then the error
> disappears (of course it doesn't really provide a solution as to why there
> is the error.
>
> Adding ".tblProducts" to the SELECT fields (e.g. tblProducts. ProductID)
> doesn't solve the problem.
>
> objRecordset has been used previously, but even if I "Set objRecordset =
> Nothing" first, no go. Even if I make a new variable ("Dim objRecordset" )
> within this Function, no go. It appears that I'm missing something in the
> SQL string, but as I can cut and paste it into an MS Access DB query and it
> works correctly, I can't see what can possibly be causing the problem!
>
> Any suggestions would be greatly appreciated. This code is adapted from
> something I've had online for 6+ years, just updating to
> "Microsoft.Jet. OLEDB.4.0" (which part of the code had been overhauled, part
> hadn't) ... and so getting a strange error like this is rather annoying.
>
> Also, if I cut the code out of the Function, and paste it into the main
> code, I get the same error, as does passing hard coded 'variables' for
> strPCode AND curPrice (e.g. replacing them with what the function was
> passing them, e.g. Code='ABC' AND Price=10
>
> Any help would be very much appreciated!
>
> Cheers,
> Graeme
>
>
>
>
>
> [Non-text portions of this message have been removed]
>











[Non-text portions of this message have been removed]

#12400 From: "Graeme" <gnwilson2001@...>
Date: Tue Nov 10, 2009 7:01 pm
Subject: Re: [ASP] Bizarre error '80004005'
gnwilson2001
Offline Offline
Send Email Send Email
 
Thanks for all the suggestions. Unfortunately it isn't related to any of the
parts you guys have suggested. If I "SELECT *" it works, but it I try to
selected a named field. e.g. "SELECT Code FROM..." then it immediately bombs, so
therefore not related to the "WHERE" clause.

I spent 4 hours last night trying every combination to get through, trying
different values for cursor types etc, and nothing. The only 'fix' was the
SELECT *, which doesn't really do what I want.

The only other option I found related to '80004005' is to do with permissions of
the file/directory, so I may contact my host to double check these things, but
on a read only statement I can't see that a problem should/could occur... then
again, this is Microsoft ;)

I will probably try re-writing some of my code to try something else... I don't
know what right now!

Cheers,
Graeme

--- In active-server-pages@yahoogroups.com, "VisioMVP" <VisioMVP@...> wrote:
>
> Try stepping through the code and see what the value for strSQL is when you
> are about to run the objRecordset.Open statement.
>
>
>
> John.   Visio MVP
>
>
>
> From: active-server-pages@yahoogroups.com
> [mailto:active-server-pages@yahoogroups.com] On Behalf Of Graeme
> Sent: November-10-09 4:46 AM
> To: active-server-pages@yahoogroups.com
> Subject: [ASP] Bizarre error '80004005'
>
>
>
>
>
> Hi all,
>
> Well, this error has really got me stumped. There is no additional
> information other than: error '80004005' (not even the ever 'useful'
> Unspecified Error)
>
> The piece of code causing the problem is:
>
> Function BuildSize(strPCode, curPrice)
>
> Set objRecordset = Server.CreateObject("ADODB.Recordset")
>
> strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
> ExtendedDelivery, POA"
> strSQL = strSQL & " FROM tblProducts"
> strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "'
> AND Price=" & CStr(curPrice)
> strSQL = strSQL & " ORDER BY Size;"
>
> objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
> adLockReadOnly, adCmdText
>
> ...
>
> End Function
>
> It dies on the "objRecordset.Open" part. The weirdest thing to me is that if
> I replace the strSQL = "SELECT * FROM tblProducts;" then the error
> disappears (of course it doesn't really provide a solution as to why there
> is the error.
>
> Adding ".tblProducts" to the SELECT fields (e.g. tblProducts.ProductID)
> doesn't solve the problem.
>
> objRecordset has been used previously, but even if I "Set objRecordset =
> Nothing" first, no go. Even if I make a new variable ("Dim objRecordset")
> within this Function, no go. It appears that I'm missing something in the
> SQL string, but as I can cut and paste it into an MS Access DB query and it
> works correctly, I can't see what can possibly be causing the problem!
>
> Any suggestions would be greatly appreciated. This code is adapted from
> something I've had online for 6+ years, just updating to
> "Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled, part
> hadn't) ... and so getting a strange error like this is rather annoying.
>
> Also, if I cut the code out of the Function, and paste it into the main
> code, I get the same error, as does passing hard coded 'variables' for
> strPCode AND curPrice (e.g. replacing them with what the function was
> passing them, e.g. Code='ABC' AND Price=10
>
> Any help would be very much appreciated!
>
> Cheers,
> Graeme
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

#12399 From: "VisioMVP" <VisioMVP@...>
Date: Tue Nov 10, 2009 5:52 pm
Subject: RE: [ASP] Bizarre error '80004005'
lancucka
Offline Offline
Send Email Send Email
 
Try stepping through the code and see what the value for strSQL is when you
are about to run the objRecordset.Open statement.



John.   Visio MVP



From: active-server-pages@yahoogroups.com
[mailto:active-server-pages@yahoogroups.com] On Behalf Of Graeme
Sent: November-10-09 4:46 AM
To: active-server-pages@yahoogroups.com
Subject: [ASP] Bizarre error '80004005'





Hi all,

Well, this error has really got me stumped. There is no additional
information other than: error '80004005' (not even the ever 'useful'
Unspecified Error)

The piece of code causing the problem is:

Function BuildSize(strPCode, curPrice)

Set objRecordset = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
ExtendedDelivery, POA"
strSQL = strSQL & " FROM tblProducts"
strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "'
AND Price=" & CStr(curPrice)
strSQL = strSQL & " ORDER BY Size;"

objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
adLockReadOnly, adCmdText

...

End Function

It dies on the "objRecordset.Open" part. The weirdest thing to me is that if
I replace the strSQL = "SELECT * FROM tblProducts;" then the error
disappears (of course it doesn't really provide a solution as to why there
is the error.

Adding ".tblProducts" to the SELECT fields (e.g. tblProducts.ProductID)
doesn't solve the problem.

objRecordset has been used previously, but even if I "Set objRecordset =
Nothing" first, no go. Even if I make a new variable ("Dim objRecordset")
within this Function, no go. It appears that I'm missing something in the
SQL string, but as I can cut and paste it into an MS Access DB query and it
works correctly, I can't see what can possibly be causing the problem!

Any suggestions would be greatly appreciated. This code is adapted from
something I've had online for 6+ years, just updating to
"Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled, part
hadn't) ... and so getting a strange error like this is rather annoying.

Also, if I cut the code out of the Function, and paste it into the main
code, I get the same error, as does passing hard coded 'variables' for
strPCode AND curPrice (e.g. replacing them with what the function was
passing them, e.g. Code='ABC' AND Price=10

Any help would be very much appreciated!

Cheers,
Graeme





[Non-text portions of this message have been removed]

#12398 From: Chris Hagwood <cwh@...>
Date: Tue Nov 10, 2009 5:23 pm
Subject: Re: [ASP] Bizarre error '80004005'
chris_hagwood
Offline Offline
Send Email Send Email
 
I'd say it's in the SQL string.  I'd second the suggestion that
if  CStr(curPrice) is a string, then maybe you need to add some ' marks.

You can add one piece at a time to your WHERE clause and see when it stops
working.

On Tue, Nov 10, 2009 at 4:46 AM, Graeme <gnwilson2001@...> wrote:

> Hi all,
>
> Well, this error has really got me stumped. There is no additional
> information other than: error '80004005' (not even the ever 'useful'
> Unspecified Error)
>
> The piece of code causing the problem is:
>
> Function BuildSize(strPCode, curPrice)
>
>        Set objRecordset = Server.CreateObject("ADODB.Recordset")
>
>        strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity,
> ExtendedDelivery, POA"
>        strSQL = strSQL & " FROM tblProducts"
>        strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode)
> & "' AND Price=" & CStr(curPrice)
>        strSQL = strSQL & " ORDER BY Size;"
>
>        objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
> adLockReadOnly, adCmdText
>
> ...
>
> End Function
>
> It dies on the "objRecordset.Open" part. The weirdest thing to me is that
> if I replace the strSQL = "SELECT * FROM tblProducts;" then the error
> disappears (of course it doesn't really provide a solution as to why there
> is the error.
>
> Adding ".tblProducts" to the SELECT fields (e.g. tblProducts.ProductID)
> doesn't solve the problem.
>
> objRecordset has been used previously, but even if I "Set objRecordset =
> Nothing" first, no go. Even if I make a new variable ("Dim objRecordset")
> within this Function, no go. It appears that I'm missing something in the
> SQL string, but as I can cut and paste it into an MS Access DB query and it
> works correctly, I can't see what can possibly be causing the problem!
>
> Any suggestions would be greatly appreciated. This code is adapted from
> something I've had online for 6+ years, just updating to
> "Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled, part
> hadn't) ... and so getting a strange error like this is rather annoying.
>
> Also, if I cut the code out of the Function, and paste it into the main
> code, I get the same error, as does passing hard coded 'variables' for
> strPCode AND curPrice (e.g. replacing them with what the function was
> passing them, e.g. Code='ABC' AND Price=10
>
> Any help would be very much appreciated!
>
> Cheers,
> Graeme
>
>
>
> ------------------------------------
>
> ---------------------------------------------------------------------
>  Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
>  Post       : active-server-pages@yahoogroups.com
>  Subscribe  : active-server-pages-subscribe@yahoogroups.com
>  Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
> ---------------------------------------------------------------------Yahoo!
> Groups Links
>
>
>
>


[Non-text portions of this message have been removed]

#12397 From: Mark E <meckeard2000@...>
Date: Tue Nov 10, 2009 5:03 pm
Subject: Re: [ASP] Bizarre error '80004005'
meckeard2000
Offline Offline
Send Email Send Email
 
Since you stripped down your SQL statement, I'd say it related to the where
clause.
 
I noticed your using CStr() to convert your second value to a string but not
wrapping it in quotes.  It also appears to be a non-string/char value.  Could
that be the issue?
 
Mark

--- On Tue, 11/10/09, Graeme <gnwilson2001@...> wrote:


From: Graeme <gnwilson2001@...>
Subject: [ASP] Bizarre error '80004005'
To: active-server-pages@yahoogroups.com
Date: Tuesday, November 10, 2009, 4:46 AM


 



Hi all,

Well, this error has really got me stumped. There is no additional information
other than: error '80004005' (not even the ever 'useful' Unspecified Error)

The piece of code causing the problem is:

Function BuildSize(strPCode, curPrice)

Set objRecordset = Server.CreateObject ("ADODB.Recordse t")

strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity, ExtendedDelivery,
POA"
strSQL = strSQL & " FROM tblProducts"
strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "' AND
Price=" & CStr(curPrice)
strSQL = strSQL & " ORDER BY Size;"

objRecordset. Open strSQL, DB_ConnectionString , adOpenForwardOnly,
adLockReadOnly, adCmdText

...

End Function

It dies on the "objRecordset. Open" part. The weirdest thing to me is that if I
replace the strSQL = "SELECT * FROM tblProducts; " then the error disappears (of
course it doesn't really provide a solution as to why there is the error.

Adding ".tblProducts" to the SELECT fields (e.g. tblProducts. ProductID) doesn't
solve the problem.

objRecordset has been used previously, but even if I "Set objRecordset =
Nothing" first, no go. Even if I make a new variable ("Dim objRecordset" )
within this Function, no go. It appears that I'm missing something in the SQL
string, but as I can cut and paste it into an MS Access DB query and it works
correctly, I can't see what can possibly be causing the problem!

Any suggestions would be greatly appreciated. This code is adapted from
something I've had online for 6+ years, just updating to "Microsoft.Jet.
OLEDB.4.0" (which part of the code had been overhauled, part hadn't) ... and so
getting a strange error like this is rather annoying.

Also, if I cut the code out of the Function, and paste it into the main code, I
get the same error, as does passing hard coded 'variables' for strPCode AND
curPrice (e.g. replacing them with what the function was passing them, e.g.
Code='ABC' AND Price=10

Any help would be very much appreciated!

Cheers,
Graeme








__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

[Non-text portions of this message have been removed]

#12396 From: "Graeme" <gnwilson2001@...>
Date: Tue Nov 10, 2009 9:46 am
Subject: Bizarre error '80004005'
gnwilson2001
Offline Offline
Send Email Send Email
 
Hi all,

Well, this error has really got me stumped. There is no additional information
other than: error '80004005' (not even the ever 'useful' Unspecified Error)

The piece of code causing the problem is:

Function BuildSize(strPCode, curPrice)

	 Set objRecordset = Server.CreateObject("ADODB.Recordset")

	 strSQL = "SELECT ProductID, Size, Code, SortCode, Quantity, ExtendedDelivery,
POA"
	 strSQL = strSQL & " FROM tblProducts"
	 strSQL = strSQL & " WHERE Online = True AND Code='" & CStr(strPCode) & "' AND
Price=" & CStr(curPrice)
	 strSQL = strSQL & " ORDER BY Size;"

	 objRecordset.Open strSQL, DB_ConnectionString, adOpenForwardOnly,
adLockReadOnly, adCmdText

...

End Function

It dies on the "objRecordset.Open" part. The weirdest thing to me is that if I
replace the strSQL = "SELECT * FROM tblProducts;" then the error disappears (of
course it doesn't really provide a solution as to why there is the error.

Adding ".tblProducts" to the SELECT fields (e.g. tblProducts.ProductID) doesn't
solve the problem.

objRecordset has been used previously, but even if I "Set objRecordset =
Nothing" first, no go. Even if I make a new variable ("Dim objRecordset") within
this Function, no go. It appears that I'm missing something in the SQL string,
but as I can cut and paste it into an MS Access DB query and it works correctly,
I can't see what can possibly be causing the problem!

Any suggestions would be greatly appreciated. This code is adapted from
something I've had online for 6+ years, just updating to
"Microsoft.Jet.OLEDB.4.0" (which part of the code had been overhauled, part
hadn't) ... and so getting a strange error like this is rather annoying.

Also, if I cut the code out of the Function, and paste it into the main code, I
get the same error, as does passing hard coded 'variables' for strPCode AND
curPrice (e.g. replacing them with what the function was passing them, e.g.
Code='ABC' AND Price=10

Any help would be very much appreciated!

Cheers,
Graeme

#12395 From: "neilmarvin" <startrekcafe@...>
Date: Sat Sep 19, 2009 1:33 am
Subject: Fwd: functions help
neilmarvin
Offline Offline
Send Email Send Email
 
--- In helpwithvb@yahoogroups.com, "Marvin Hunkin" <startrekcafe@...> wrote:

Hi .
did a course in visual basic at a college in south Australia in 2008 ,
Australia.
And a blind programming student using the jaws for windows screen reader
from http://www.freedomscientific.com

well had forgotten a lot of what i learnt in vb.
and now a lot of the examples in the course got corrupted.
and only my final project survived.
now.
a blind friend and i developing a star trek application using visual web
developer 2008 express and sql server and management studio 2008 express.
and he had written quite a lot of articles and will post on
http://www.blindgeeks.org
but my turn to write the article.
and when i got to advanced sql.
for using data tables got a bit stuck.
so created a test site and some quizzes.
but now, he is abandoing me.
as i am struggling to complete this third quiz.
the third quiz is to create a function, which takes two parameters and adds
the two numbers and returns the two numbers .
in vwd.
in the website and a message to show the two integers passed and the final
result.
Rick thomas says he is the guy who is helping me to learn my vb education on
my own.
so will paste the vb class, the markup for the page and the sub module click
event code.
he says that i am calling it incorrect.
can you please help.
if you are still up tonight.
or over the weekend.
please reply asap.
and help me out.
until i can figure this quiz out.
he says the star trek series is off, until i have a better understanding of
vb, and functions, sub, and parameters.
have been reading some tutorials on line.
please help me out if possible.
at a loss.
cheers Marvin.

Imports Microsoft.VisualBasic

Public Class TestClass1

' Public sub for Hello World Goes here.
Public Sub HelloWorld()
' User Message goes Here.
UserMsg.Show("Hello World")
End Sub
Public Sub DisplayParms (ByVal PassedMessage As string )
' User Msg goes here.
UserMsg.Show("PassedMessage Variable " & PassedMessage)
End Sub
  Public Function AddTwoNumbers(ByVal  PassedInt1 As Integer, ByVal
PassedInt2 As Integer) As Integer

' Declare Variables.

Dim answer As Integer = 0

' User Message for PassedInt1.
UserMsg.Show("PassedInt1 " & PassedInt1)
' User Message for PassedInt2.
UserMsg.Show("PassedInt2 " & PassedInt2)

' Return answer.
answer = PassedInt1 + PassedInt2
' User Message for answer.
UserMsg.Show("Answer is " & answer)
Return answer
end function

End Class

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
     <title></title>
</head>
<body>
     <form id="form1" runat="server">
     <div>
<asp:Button runat="server" Text="Display" ID="Button1" />
     </div>
     </form>
</body>
</html>


Partial Class _Default
     Inherits System.Web.UI.Page

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click

' Declare Variables.
' Instantiate a copy of the class.
' Call the sub routine.
Dim PassedInt1 As Integer = 2
Dim PassedInt2 As Integer = 2
Dim TestClass1 As TestClass1
TestClass1 = New TestClass1()
TestClass1.HelloWorld()
TestClass1.DisplayParms("Hello world")
TestClass1.AddTwoNumbers(PassedInt1, PassedInt2 )
  End Sub
End Class

and here's the user msessage, the global code module and a logger module.
Public Class Globals
' Function:
' This Class  holds global constants and variables so no need to
Instantiate.
Public Shared RootPath  As String = ""

Imports Microsoft.VisualBasic
Imports System.Configuration
Public Class Logger
' Private Shared Inst As Logger = New Logger

Public Shared Sub WriteLine(ByVal Line As String)
Dim Filename As String
filename = "c:\TestSite\Logger.txt"
Dim objWriter As New System.IO.StreamWriter(Filename, True)
Try
If Not objWriter Is Nothing Then
objWriter.WriteLine(Line)
End If
Catch ex As Exception
End Try
objWriter.Close()
objWriter.Dispose()
End Sub
Public Shared Sub Clear()
Dim filename As String
filename = "c:\TestSite\Logger.txt"
' filename = Globals.RootPath & _
' System.Configuration.ConfigurationManager.AppSettings("LoggerPath")
Dim Sw As System.IO.StreamWriter
Sw = new System.IO.StreamWriter(filename)
Sw.WriteLine(" Newly Created:")
Sw.WriteLine( "")
Sw.Close()
Sw.Dispose()

End Sub

End Class

Imports Microsoft.VisualBasic
Public Class UserMsg
Public Shared Sub Show(ByVal Message As String)
System.Web.HttpContext.Current.Response.Write( _
"<SCRIPT LANGUAGE=""JavaScript"">" _
& vbCrLf)
System.Web.HttpContext.Current.Response.Write( _
"alert(""" & Message & """)" _
& vbCrLf)
         System.Web.HttpContext.Current.Response.Write("</SCRIPT>")
End Sub

End Class

End Class


----- Original Message -----
From: "RicksPlace" <ofbgmail@...>
To: "Marvin Hunkin" <startrekcafe@...>
Sent: Friday, September 18, 2009 8:58 PM
Subject: Re: quiz 3 success


The following is not a correct call to a function. It demonstrates that you
do not understand the diference between a Subroutine and a Function even
though I just told you in the most simple terms I could. You will have to
continue your VB education on your own until you can use functions and
subroutines well. When you get there let me know and I will give you some
more quizs to make sure you understand them so I don't have to go through
trying to teach you Visual Basic on top of VWD. Then we can continue with
the series if I am not off into another project by then.
TestClass1.AddTwoNumbers(PassedInt1, PassedInt2 )
The above statement is incorrect.
  End Sub
----- Original Message -----
From: "Marvin Hunkin" <startrekcafe@...>
To: "RicksPlace" <ofbgmail@...>
Sent: Friday, September 18, 2009 6:43 AM
Subject: Re: quiz 3 success


>        hi.
> here's the click event module.
> is that what you are looking for.
> if not please explain exactly what you want.
> not a mind reader.
> Marvin.
>
>
> Partial Class _Default
>    Inherits System.Web.UI.Page
>
> Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Button1.Click
>
> ' Declare Variables.
> ' Instantiate a copy of the class.
> ' Call the sub routine.
> Dim PassedInt1 As Integer = 2
> Dim PassedInt2 As Integer = 2
> Dim TestClass1 As TestClass1
> TestClass1 = New TestClass1()
> TestClass1.HelloWorld()
> TestClass1.DisplayParms("Hello world")
> TestClass1.AddTwoNumbers(PassedInt1, PassedInt2 )
> End Sub
> End Class
>
>
> ----- Original Message -----
> From: "RicksPlace" <ofbgmail@...>
> To: "Marvin Hunkin" <startrekcafe@...>
> Sent: Friday, September 18, 2009 7:32 PM
> Subject: Re: quiz 3 success
>
>
> OK, here is the story. You use a functiion for a diferent reason than a
> Subroutine. A subroutine is a block of code you want to execute that does
> something like read a file or write a file or other things. A function is
> a
> block of code you call when you want to get something like a value
> returned
> to the calling module. A function returns a value to the calling module
> while a subroutine does not return a value to the calling subroutine.
> Functions are things that do something and return something. Most math
> functions are functions like to get the square root of a number or other
> built-in functions. Your problem did not require anything except to
> specify
> the parameters to pass into your function. Both Subroutines and Functiions
> can receive parameters. The parameter list in the calling module must
> match
> the parameter list in the called module. Now. Please display the result of
> your function in the click event and send me the code for the click event
> when done.
> I will not do any more explanations on this subject unless we get into
> more
> depth with functions and subs related to the project.
> Rick
> ----- Original Message -----
> From: "Marvin Hunkin" <startrekcafe@...>
> To: "RicksPlace" <ofbgmail@...>
> Sent: Friday, September 18, 2009 5:11 AM
> Subject: Re: quiz 3 success
>
>
>>        hi.
>> well tell me how to get it to work.
>> thought i had.
>> let me know.
>> i am not a mind reader.
>> please let me know what you meant.
>> had to copy the function definition from that web site page.
>> so not sure why i was getting errors.
>> if i called the function straight from the click event was getting
>> errors.
>> so tell me how to get it right and to fix it right.
>> i am not a mind reader.
>> sorry.
>> i have disapointed you.
>> Marvin.
>> ----- Original Message -----
>> From: "RicksPlace" <ofbgmail@...>
>> To: "Marvin Hunkin" <startrekcafe@...>
>> Sent: Friday, September 18, 2009 6:15 PM
>> Subject: Re: quiz 3 success
>>
>>
>> Marv: You are not using the variable you return to the click event. the
>> idea
>> behind a function is that you call it to get something.In you r click
>> event
>> display the result of the calculation.
>> ----- Original Message -----
>> From: "Marvin Hunkin" <startrekcafe@...>
>> To: "RicksPlace" <ofbgmail@...>
>> Sent: Friday, September 18, 2009 1:11 AM
>> Subject: quiz 3 success
>>
>>
>>> hi.
>>> do not know why i was getting those errors.
>>> so went to the home work site and copied the private function
>>> definition.
>>> changed it to public.
>>> now got the quiz working.
>>> it gives me the correct answer.
>>> so got it working at last.
>>> glad about that.
>>> able to pass 2 variables .
>>> cheers Marvin.
>>>
>>> ps: was able to figure this on my own eventually.
>>> at least learning to debug my code.
>>>
>>> Imports Microsoft.VisualBasic
>>>
>>> Public Class TestClass1
>>>
>>> ' Public sub for Hello World Goes here.
>>> Public Sub HelloWorld()
>>> ' User Message goes Here.
>>> UserMsg.Show("Hello World")
>>> End Sub
>>> Public Sub DisplayParms (ByVal PassedMessage As string )
>>> ' User Msg goes here.
>>> UserMsg.Show("PassedMessage Variable " & PassedMessage)
>>> End Sub
>>> Public Function AddTwoNumbers(ByVal  PassedInt1 As Integer, ByVal
>>> PassedInt2 As Integer) As Integer
>>>
>>> ' Declare Variables.
>>>
>>> Dim answer As Integer = 0
>>>
>>> ' User Message for PassedInt1.
>>> UserMsg.Show("PassedInt1 " & PassedInt1)
>>> ' User Message for PassedInt2.
>>> UserMsg.Show("PassedInt2 " & PassedInt2)
>>>
>>> ' Return answer.
>>> answer = PassedInt1 + PassedInt2
>>> ' User Message for answer.
>>> UserMsg.Show("Answer is " & answer)
>>> Return answer
>>> end function
>>>
>>> End Class
>>>
>>> <%@ Page Language="VB" AutoEventWireup="false"
>>> CodeFile="Default.aspx.vb"
>>> Inherits="_Default" %>
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>>
>>> <html xmlns="http://www.w3.org/1999/xhtml">
>>> <head runat="server">
>>>    <title></title>
>>> </head>
>>> <body>
>>>    <form id="form1" runat="server">
>>>    <div>
>>> <asp:Button runat="server" Text="Display" ID="Button1" />
>>>    </div>
>>>    </form>
>>> </body>
>>> </html>
>>>
>>>
>>> Partial Class _Default
>>>    Inherits System.Web.UI.Page
>>>
>>> Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
>>> System.EventArgs) Handles Button1.Click
>>>
>>> ' Declare Variables.
>>> ' Instantiate a copy of the class.
>>> ' Call the sub routine.
>>> Dim PassedInt1 As Integer = 2
>>> Dim PassedInt2 As Integer = 2
>>> Dim TestClass1 As TestClass1
>>> TestClass1 = New TestClass1()
>>> TestClass1.HelloWorld()
>>> TestClass1.DisplayParms("Hello world")
>>> TestClass1.AddTwoNumbers(PassedInt1, PassedInt2 )
>>> End Sub
>>> End Class
>>>
>>>
>>>
>>
>>
>>
>
>
>

--- End forwarded message ---

#12394 From: "Soren" <soren.j.winslow@...>
Date: Mon Aug 10, 2009 4:19 pm
Subject: ParseError with Yahoo News RSS Feed Using XMLDOM
sorenwinslow
Offline Offline
Send Email Send Email
 
I have a sub that reads RSS news feeds. It works great with any RSS news feed
(for example google RSS Feeds), except for Yahoo news. If I just go to the URL
of the feed, it opens fine. If I download the feed then point the URL to the
downloaded feed, it works. Otherwise I am getting a parse error code
-2146697208. What do I need to do to get Yahoo News feeds to work?

As a test, you can see the result at
http://www.triumphconnection.com/YahooNewsTest.asp
The URL of the RSS feed that it is using is 
http://news.search.yahoo.com/news/rss?ei=UTF-8&eo=UTF-8&p=%22Triumph+Motorcycle%\
22

<%

    Sub BuildRSS(TheFeed)

       Set objXML = Server.CreateObject("Microsoft.XMLDOM")

          objXML.Async = False
          objXML.SetProperty "ServerHTTPRequest", True
          objXML.ResolveExternals = True
          objXML.ValidateOnParse = True
          objXML.Load(TheFeed)

          If (objXML.parseError.errorCode = 0) Then
             Set objRoot = objXML.documentElement
             If IsObject(objRoot) = False Then
                Response.Write "There was a problem with the RSS feed: " &
TheFeed
             Else

                Set objItems = objRoot.getElementsByTagName("item")
                   If IsObject(objItems) = True Then
                      For Each objItem in objItems

                         Response.Write "Title = " &
objItem.selectSingleNode("title").Text & "<br>" & chr(13)
                         Response.Write "TheDesc = " &
objItem.selectSingleNode("description").Text & "<br>" & chr(13)
                         Response.Write "TheLink = " &
objItem.selectSingleNode("link").Text & "<br>" & chr(13)
                         Response.Write "TheDate = " &
objItem.selectSingleNode("pubDate").Text & "<br>" & chr(13)
                      Next
                   End If
                Set objItems = Nothing
             End If
             Set objRoot = Nothing
          Else
              Response.Write "There was an error retrieving the RSS feed: " & _
                             TheFeed  & _
                             "<br> objXML.parseError.errorCode = " & _
                             objXML.parseError.errorCode & "<br>"
          End If

       Set objXML = Nothing


    End Sub

    NewsFeed =
"http://news.search.yahoo.com/news/rss?ei=UTF-8&eo=UTF-8&p=%22Triumph+Motorcycle\
%22"
    BuildRSS(NewsFeed)

  %>

Thanks in advance for your help,
Soren

#12393 From: "Moshe Tapnack" <elists@...>
Date: Sun Aug 9, 2009 3:01 pm
Subject: RE: [ASP] (push-)Downloading from IE
tapnack
Offline Offline
Send Email Send Email
 
Hi Shawn

A VERY belated thank you for this reply -
I was away on reserve duty, vacation, and a little work time in-between the 2...
and I have just tried this - and its all good.

Thanks again!
Moshe


-----Original Message-----
From: active-server-pages@yahoogroups.com
[mailto:active-server-pages@yahoogroups.com] On Behalf Of Shawn K. Hall
Sent: Wednesday, May 06, 2009 6:40 AM
To: active-server-pages@yahoogroups.com
Subject: RE: [ASP] (push-)Downloading from IE

Hi Moshe,

Change this:
   Response.ContentType = "text/csv"
To this:
   Response.ContentType  = "application/x-msdownload"

This is the only way to consistently "force" a download in IE. Otherwise
the contenttype header MUST match a registry key for an application that
supports that specific content-type AND have shell permissions to be
invoked in that manner. If not, it'll either be interpreted as text
(which is just downright rude for HTML and EXE files) or it'll "bounce"
(an error will usually appear with the garbage message you're seeing).

You can check the useragent header for IE and only send this contenttype
header if the UA is IE if you prefer, but since all other browsers
support this value, too, as an automatic download there really isn't a
reason to do all that.

-Shawn




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

---------------------------------------------------------------------
  Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
  Post       : active-server-pages@yahoogroups.com
  Subscribe  : active-server-pages-subscribe@yahoogroups.com
  Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
---------------------------------------------------------------------Yahoo!
Groups Links

#12392 From: soren.j.winslow@...
Date: Tue Jul 14, 2009 4:33 pm
Subject: Re: [ASP] Cookie Help
sorenwinslow
Offline Offline
Send Email Send Email
 
I think I got it figured out... maybe... I'll check it again later.
I added Response.Cookies("NFLTicketsAndMore").Path=""

Soren





Soren <soren.j.winslow@...>
Sent by: active-server-pages@yahoogroups.com
07/14/2009 09:07 AM
Please respond to
active-server-pages@yahoogroups.com


To
active-server-pages@yahoogroups.com
cc

Subject
[ASP] Cookie Help






I need some help with a cookie issue. I don't know if the problem is with
my code or my host (GoDaddy).

The website is http://www.nflticketsandmore.com

Here is what is supposed to happen. A visitor goes to the web site and
selects their favorite team. If they don't then the general NFL profile is
loaded. Their selection is saved in a cookie so that when they return back
to the web site the profile for their team is loaded. If they change teams
then the cookie value for team changes.

Here is what is happening. The cookie for the visitors team is not being
read so each time they return to the website the default NFL profile is
being loaded.

To me the code looks right, but with it not working I am not sure. Here is
the code that I hava along with comments:

'Check Querystring for team selection
Team = Request("Team")

'If no team selection check cookie to see if
'they have previously selected a team
If Len(Trim(Team)) = 0 Then
   Team = Request.Cookies("NFLTicketsAndMore")("Team")
End If

'If cookies are turned off or empty
'check session variable for team value
If Len(Trim(Team)) = 0 Then
   Team = Session("Team")
End If

'If team is still not found
'set NFL as profile
If Len(Trim(Team)) = 0 Then
   Team = "NFL"
End If

'Set team selection session vaiable
Session("Team") = Team

'Set team selection cookie
Response.Cookies("NFLTicketsAndMore")("Team") = Team
'Set cookie expiration for 180 days
Response.Cookies("NFLTicketsAndMore").Expires = DateAdd("d", 180, Date())

Thanks for yoru help,
Soren



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

---------------------------------------------------------------------
  Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
  Post       : active-server-pages@yahoogroups.com
  Subscribe  : active-server-pages-subscribe@yahoogroups.com
  Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
---------------------------------------------------------------------Yahoo!
Groups Links




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



[Non-text portions of this message have been removed]

#12391 From: "Soren" <soren.j.winslow@...>
Date: Tue Jul 14, 2009 4:07 pm
Subject: Cookie Help
sorenwinslow
Offline Offline
Send Email Send Email
 
I need some help with a cookie issue. I don't know if the problem is with my
code or my host (GoDaddy).

The website is http://www.nflticketsandmore.com

Here is what is supposed to happen. A visitor goes to the web site and selects
their favorite team. If they don't then the general NFL profile is loaded. Their
selection is saved in a cookie so that when they return back to the web site the
profile for their team is loaded. If they change teams then the cookie value for
team changes.

Here is what is happening. The cookie for the visitors team is not being read so
each time they return to the website the default NFL profile is being loaded.

To me the code looks right, but with it not working I am not sure. Here is the
code that I hava along with comments:

'Check Querystring for team selection
Team = Request("Team")

'If no team selection check cookie to see if
'they have previously selected a team
If Len(Trim(Team)) = 0 Then
   Team = Request.Cookies("NFLTicketsAndMore")("Team")
End If

'If cookies are turned off or empty
'check session variable for team value
If Len(Trim(Team)) = 0 Then
   Team = Session("Team")
End If

'If team is still not found
'set NFL as profile
If Len(Trim(Team)) = 0 Then
   Team = "NFL"
End If

'Set team selection session vaiable
Session("Team") = Team

'Set team selection cookie
Response.Cookies("NFLTicketsAndMore")("Team") = Team
'Set cookie expiration for 180 days
Response.Cookies("NFLTicketsAndMore").Expires = DateAdd("d", 180, Date())

Thanks for yoru help,
Soren

#12390 From: "Shawn K. Hall" <shawn@...>
Date: Sun May 31, 2009 4:10 am
Subject: RE: [ASP] Extract Font Names?
shawn_ra
Online Now Online Now
Send Email Send Email
 
> Does anyone have a script or know how to extract the font
> names from the font folder on the machine the script is running?

In order to determine available fonts through ASP you'd need to give
additional permissions to the web user. I highly recommend against that.

Instead, if the fonts change regularly, run a script server-side to
process the same font listing from the fonts directory (or any other)
that updates a database that the web user would have access to. Then
check *that* database for available fonts from within your ASP pages.

I've written several tools in the past that do all of this and much
more, but some are under NDA and others are only partially finished
projects.

I can tell you that it's MUCH easier to use ASP.NET (instead of ASP) to
generate images and what-not using server-side stored fonts. It's also
BETTER if you are trying to create some form of font library if the
fonts are NOT stored in the Windows Fonts directory (if they're stored
in the Windows Fonts folder they affect performance server-wide - don't
do that!).

PHP and ASP.net are relatively equal in features and functionality in
this respect, but PHP uses less memory (and is usually cheaper to host),
and ASP.NET has fewer requirements (no external libs required).

-Shawn

#12389 From: "Soren" <soren.j.winslow@...>
Date: Fri May 29, 2009 6:07 pm
Subject: Extract Font Names?
sorenwinslow
Offline Offline
Send Email Send Email
 
Does anyone have a script or know how to extract the font names from the font
folder on the machine the script is running?

Soren

#12388 From: "Shawn K. Hall" <shawn@...>
Date: Wed May 6, 2009 3:40 am
Subject: RE: [ASP] (push-)Downloading from IE
shawn_ra
Online Now Online Now
Send Email Send Email
 
Hi Moshe,

Change this:
   Response.ContentType = "text/csv"
To this:
   Response.ContentType  = "application/x-msdownload"

This is the only way to consistently "force" a download in IE. Otherwise
the contenttype header MUST match a registry key for an application that
supports that specific content-type AND have shell permissions to be
invoked in that manner. If not, it'll either be interpreted as text
(which is just downright rude for HTML and EXE files) or it'll "bounce"
(an error will usually appear with the garbage message you're seeing).

You can check the useragent header for IE and only send this contenttype
header if the UA is IE if you prefer, but since all other browsers
support this value, too, as an automatic download there really isn't a
reason to do all that.

-Shawn

#12387 From: "Moshe Tapnack" <elists@...>
Date: Tue May 5, 2009 10:53 pm
Subject: RE: [ASP] (push-)Downloading from IE
tapnack
Offline Offline
Send Email Send Email
 
Hi Dave

There is no HTML - it's a purely ASP server side page - its responsing to
the CSV file.

And in FF the script works perfectly anyway...



-----Original Message-----
From: active-server-pages@yahoogroups.com [mailto:active-server-

You're getting an IE error, but have shown a script that we are not going to

be able to run.  This is not going to allow analysis.

What you need to provide is the HTML page that the script has generated.  If

you can't get it from IE, you can get it from FF.

Regards, Dave S

----- Original Message -----
From: "Moshe Tapnack" <elists@...>
To: <active-server-pages@yahoogroups.com>
Sent: Wednesday, May 06, 2009 5:00 AM
Subject: [ASP] (push-)Downloading from IE


> Hey there
>
> I have a script that should download a CSV file from the browser. It works
> perfectly on Firefox and Chrome - but on IE(v7) it chokes and throws and
> error  - "IE was not able to download the file..."
>
> In fact I have a similar issue at the moment, when downloading a JPG - the
> script first checks some database stuff, then retrieves the image from
> higher-than-the-root and pushes it to the user. Works like a charm in
> Firefox, but chokes in IE.
>
> any idea what it could be?
> ASP code attached.
>
> Thanks!
> Moshe
>
> <%
> sql = "SELECT ...."
> set rs = conn.execute(sql)
>
> if rs.eof then
> response.Write("No data available in this table")
> set rs = nothing
> else
> strReturn = ""
> for each field in rs.fields
> strReturn = strReturn & field.name & ","
> next
> strReturn = left(strReturn, len(strReturn)-1) 'remove last comma
> strReturn = strReturn & vbcr
>
> do while not rs.eof
> for each field in rs.fields
>
> fieldvalue = rs.fields(field.name) & ""
> fieldvalue = replace(fieldvalue, ","," ")
> fieldvalue = replace(fieldvalue, """","'")
> fieldvalue = replace(fieldvalue, "="," ")
>
> fieldvalue = replace(fieldvalue, vbCrLf," ")
> fieldvalue = replace(fieldvalue, vbCr," ")
> fieldvalue = replace(fieldvalue, chr(10)," ")
> fieldvalue = replace(fieldvalue, chr(13)," ")
>
> strReturn = strReturn & chr(34) & fieldvalue &
> chr(34) &  ","
> next
> strReturn = left(strReturn, len(strReturn)-1)
> strReturn = strReturn & vbCrLf
> rs.movenext
> loop
>
>
>
> rs.Close
> set rs = Nothing
>
> server.ScriptTimeout = 18000
>
> Response.AddHeader "Content-Disposition", "attachment;
> filename=report-" & request.Cookies(ewProjectName)("programID") & "-" &
> exportTable&".csv"
>
> Response.Charset = "UTF-8"
> Response.ContentType = "text/csv"
> Response.Write  strReturn
> Response.Flush
> Response.Clear
>
> %>
>
>
>
> ------------------------------------
>
> ---------------------------------------------------------------------
> Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post       : active-server-pages@yahoogroups.com
> Subscribe  : active-server-pages-subscribe@yahoogroups.com
> Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
>
---------------------------------------------------------------------Yahoo!
> Groups Links
>
>
>



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

---------------------------------------------------------------------
  Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
  Post       : active-server-pages@yahoogroups.com
  Subscribe  : active-server-pages-subscribe@yahoogroups.com
  Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
---------------------------------------------------------------------Yahoo!
Groups Links

#12386 From: "David Smart" <smartware.consulting@...>
Date: Tue May 5, 2009 9:47 pm
Subject: Re: [ASP] (push-)Downloading from IE
smartware_co...
Offline Offline
Send Email Send Email
 
You're getting an IE error, but have shown a script that we are not going to
be able to run.  This is not going to allow analysis.

What you need to provide is the HTML page that the script has generated.  If
you can't get it from IE, you can get it from FF.

Regards, Dave S

----- Original Message -----
From: "Moshe Tapnack" <elists@...>
To: <active-server-pages@yahoogroups.com>
Sent: Wednesday, May 06, 2009 5:00 AM
Subject: [ASP] (push-)Downloading from IE


> Hey there
>
> I have a script that should download a CSV file from the browser. It works
> perfectly on Firefox and Chrome - but on IE(v7) it chokes and throws and
> error  - "IE was not able to download the file..."
>
> In fact I have a similar issue at the moment, when downloading a JPG - the
> script first checks some database stuff, then retrieves the image from
> higher-than-the-root and pushes it to the user. Works like a charm in
> Firefox, but chokes in IE.
>
> any idea what it could be?
> ASP code attached.
>
> Thanks!
> Moshe
>
> <%
> sql = "SELECT ...."
> set rs = conn.execute(sql)
>
> if rs.eof then
> response.Write("No data available in this table")
> set rs = nothing
> else
> strReturn = ""
> for each field in rs.fields
> strReturn = strReturn & field.name & ","
> next
> strReturn = left(strReturn, len(strReturn)-1) 'remove last comma
> strReturn = strReturn & vbcr
>
> do while not rs.eof
> for each field in rs.fields
>
> fieldvalue = rs.fields(field.name) & ""
> fieldvalue = replace(fieldvalue, ","," ")
> fieldvalue = replace(fieldvalue, """","'")
> fieldvalue = replace(fieldvalue, "="," ")
>
> fieldvalue = replace(fieldvalue, vbCrLf," ")
> fieldvalue = replace(fieldvalue, vbCr," ")
> fieldvalue = replace(fieldvalue, chr(10)," ")
> fieldvalue = replace(fieldvalue, chr(13)," ")
>
> strReturn = strReturn & chr(34) & fieldvalue &
> chr(34) &  ","
> next
> strReturn = left(strReturn, len(strReturn)-1)
> strReturn = strReturn & vbCrLf
> rs.movenext
> loop
>
>
>
> rs.Close
> set rs = Nothing
>
> server.ScriptTimeout = 18000
>
> Response.AddHeader "Content-Disposition", "attachment;
> filename=report-" & request.Cookies(ewProjectName)("programID") & "-" &
> exportTable&".csv"
>
> Response.Charset = "UTF-8"
> Response.ContentType = "text/csv"
> Response.Write  strReturn
> Response.Flush
> Response.Clear
>
> %>
>
>
>
> ------------------------------------
>
> ---------------------------------------------------------------------
> Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post       : active-server-pages@yahoogroups.com
> Subscribe  : active-server-pages-subscribe@yahoogroups.com
> Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
> ---------------------------------------------------------------------Yahoo!
> Groups Links
>
>
>

#12385 From: "Moshe Tapnack" <elists@...>
Date: Tue May 5, 2009 7:00 pm
Subject: (push-)Downloading from IE
tapnack
Offline Offline
Send Email Send Email
 
Hey there

I have a script that should download a CSV file from the browser. It works
perfectly on Firefox and Chrome - but on IE(v7) it chokes and throws and
error  - "IE was not able to download the file..."

In fact I have a similar issue at the moment, when downloading a JPG - the
script first checks some database stuff, then retrieves the image from
higher-than-the-root and pushes it to the user. Works like a charm in
Firefox, but chokes in IE.

any idea what it could be?
ASP code attached.

Thanks!
Moshe

<%
sql = "SELECT ...."
set rs = conn.execute(sql)

if rs.eof then
	 response.Write("No data available in this table")
	 set rs = nothing
else
	 strReturn = ""
	 for each field in rs.fields
		 strReturn = strReturn & field.name & ","
	 next
	 strReturn = left(strReturn, len(strReturn)-1) 'remove last comma
	 strReturn = strReturn & vbcr

	 do while not rs.eof
		 for each field in rs.fields

			 fieldvalue = rs.fields(field.name) & ""
			 fieldvalue = replace(fieldvalue, ","," ")
			 fieldvalue = replace(fieldvalue, """","'")
			 fieldvalue = replace(fieldvalue, "="," ")

			 fieldvalue = replace(fieldvalue, vbCrLf," ")
			 fieldvalue = replace(fieldvalue, vbCr," ")
			 fieldvalue = replace(fieldvalue, chr(10)," ")
			 fieldvalue = replace(fieldvalue, chr(13)," ")

			 strReturn = strReturn & chr(34) & fieldvalue &
chr(34) &  ","
		 next
		 strReturn = left(strReturn, len(strReturn)-1)
		 strReturn = strReturn & vbCrLf
		 rs.movenext
	 loop



	 rs.Close
	 set rs = Nothing

	 server.ScriptTimeout = 18000

	 Response.AddHeader "Content-Disposition", "attachment;
filename=report-" & request.Cookies(ewProjectName)("programID") & "-" &
exportTable&".csv"

	 Response.Charset = "UTF-8"
	 Response.ContentType = "text/csv"
	 Response.Write  strReturn
	 Response.Flush
	 Response.Clear

%>

#12384 From: "Moshe Tapnack" <elists@...>
Date: Mon Apr 20, 2009 9:33 pm
Subject: RE: [ASP] RC4 Encryption
tapnack
Offline Offline
Send Email Send Email
 
Hey Shawn

Good to hear from you!
And especially with as detailed a reply!

Both interfaces are UTF8, but I will check what the database is. I assume
that that isn't the issue, because the same data serves the number correctly
in the one interface, but not the other.

I'll take a look at the other options you mentioned.

Thanks again
Moshe


-----Original Message-----
From: active-server-pages@yahoogroups.com
[mailto:active-server-pages@yahoogroups.com] On Behalf Of Shawn K. Hall
Sent: Monday, April 20, 2009 5:49 AM
To: active-server-pages@yahoogroups.com
Subject: RE: [ASP] RC4 Encryption

Hi Moshe,

> Anyone still around here?

Yep. :)


> I have a ready-made function for RC4 encryption.
> Then it converted to Hex for storing in an SQL db (see below).
>
> The very weird thing, is that when in the order process, the
> encryption/decrypt process is perfect.
>
> But when I access the same string, using the same functions,
> with the same key, via an admin interface I built the credit
> card info that spits out - is wrong. There is some kind of a
> corruption.

Sounds like it's one of either two problems:

  * The characters in the first implementation are a different charset
than in the second - the data is being received and processed as ANSI,
UTF-8, UTF-16 or Unicode, but is being stored in a different charset
that has a different binary representation for the same characters. When
you draw the data back out, it's keeping the storage charset, instead of
the original, which is damaging the reconstruction since the actual
bytes aren't the same.

  * If the charsets are the same, the resulting value may have embedded
nulls, which ASP is incapable of correctly representing within strings.


You have four options as far as I can see.

* Instead of storing the data as hex, store it as a string with only
decimal values (a number) so it can be easily converted to a normalized
value (a double or decimal). That will enable you to reverse it back to
a proper string (if the resulting number is short enough to fit in these
types of variables).

* Ensure that the charsets are exactly the same within the storage
system and the front-end. This could be an issue if you don't have full
control over the database. If the charset for the field is changed back
to an unsupported charset, you're screwed.

* Edit the RC4 encryption/decryption functions to normalize the charset
(StrConv) before and after processing, without consideration for the
storage or frontend charsets. Chances are the RC4 functions stores the
data in a byte array throughout processing, which you should use to
convert to/from the hex values instead of reconverting it to string then
hex.

* Use a system that can encrypt/decrypt the data without ever converting
it to a binary. This will avoid the embedded null issues. This is
important, but not as safe as just avoiding charsets with embedded nulls
entirely.

-Shawn




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

---------------------------------------------------------------------
  Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
  Post       : active-server-pages@yahoogroups.com
  Subscribe  : active-server-pages-subscribe@yahoogroups.com
  Unsubscribe: active-server-pages-unsubscribe@yahoogroups.com
---------------------------------------------------------------------Yahoo!
Groups Links

#12383 From: "Shawn K. Hall" <shawn@...>
Date: Mon Apr 20, 2009 2:48 am
Subject: RE: [ASP] RC4 Encryption
shawn_ra
Online Now Online Now
Send Email Send Email
 
Hi Moshe,

> Anyone still around here?

Yep. :)


> I have a ready-made function for RC4 encryption.
> Then it converted to Hex for storing in an SQL db (see below).
>
> The very weird thing, is that when in the order process, the
> encryption/decrypt process is perfect.
>
> But when I access the same string, using the same functions,
> with the same key, via an admin interface I built the credit
> card info that spits out - is wrong. There is some kind of a
> corruption.

Sounds like it's one of either two problems:

  * The characters in the first implementation are a different charset
than in the second - the data is being received and processed as ANSI,
UTF-8, UTF-16 or Unicode, but is being stored in a different charset
that has a different binary representation for the same characters. When
you draw the data back out, it's keeping the storage charset, instead of
the original, which is damaging the reconstruction since the actual
bytes aren't the same.

  * If the charsets are the same, the resulting value may have embedded
nulls, which ASP is incapable of correctly representing within strings.


You have four options as far as I can see.

* Instead of storing the data as hex, store it as a string with only
decimal values (a number) so it can be easily converted to a normalized
value (a double or decimal). That will enable you to reverse it back to
a proper string (if the resulting number is short enough to fit in these
types of variables).

* Ensure that the charsets are exactly the same within the storage
system and the front-end. This could be an issue if you don't have full
control over the database. If the charset for the field is changed back
to an unsupported charset, you're screwed.

* Edit the RC4 encryption/decryption functions to normalize the charset
(StrConv) before and after processing, without consideration for the
storage or frontend charsets. Chances are the RC4 functions stores the
data in a byte array throughout processing, which you should use to
convert to/from the hex values instead of reconverting it to string then
hex.

* Use a system that can encrypt/decrypt the data without ever converting
it to a binary. This will avoid the embedded null issues. This is
important, but not as safe as just avoiding charsets with embedded nulls
entirely.

-Shawn

#12382 From: "Moshe Tapnack" <elists@...>
Date: Sun Apr 19, 2009 10:57 pm
Subject: RC4 Encryption
tapnack
Offline Offline
Send Email Send Email
 
Hey guys

Anyone still around here?

I have an issue that's really been messing with my head!

I have a ready-made function for RC4 encryption.
Then it converted to Hex for storing in an SQL db (see below).

The very weird thing, is that when in the order process, the
encryption/decrypt process is perfect.

But when I access the same string, using the same functions, with the same
key, via an admin interface I built the credit card info that spits out - is
wrong. There is some kind of a corruption. I have managed to find a pattern
where things are corrupt in the hex-based encrypted string, and can fix it,
But I'm really at a loss why the same string, same functions and same key
can give different results.

For example, when I display the open full CC number in the admin site, i
get: 11&11111&&111&16
but the correct number converted using the same functions and stored
directly in the database, is: 1111111111111111 (and this is viewable during
the actual order process too, when we confirm payment details after
encryption).

Does anyone have any ideas why this might happen?


Thanks!
Moshe


'==========================================================

CODE:

ENCRYPTION CODE: EncryptedCCnumber =
Ascii2Hex(EnDeCrypt(FullCCnumber,mykey))

DECRYPTION CODE: FullCCnumber =
EnDeCrypt(Hex2Ascii(EncryptedCCnumber),mykey)



'FUNCTIONS:

Function EnDeCrypt(plaintxt, psw)

	 'If plaintext is empty, return Empty String
	 if isEmpty(plaintxt) or isNull(plaintxt) or plaintxt = "" then
		 EnDeCrypt = ""
		 exit function
	 end if


	 'Declare Variables
	 dim sbox(255), key(255)
	 dim temp, tempSwap, intLength
	 dim a, b, i, j, k
	 dim cipherby, cipher

	 'Initialize some variables
	 b = 0
	 i = 0
	 j = 0

	 'Initialize sbox and key array
	 intLength = len(psw)
	 For a = 0 To 255
		 key(a)   = asc(mid(psw, (a mod intLength)+1, 1))
		 sbox(a)  = a
	 next
	 For a = 0 To 255
		 b = (b + sbox(a) + key(a)) Mod 256
		 tempSwap = sbox(a)
		 sbox(a)  = sbox(b)
		 sbox(b)  = tempSwap
	 Next

	 'Encrypt/Decrypt text
	 For a = 1 To Len(plaintxt)
		 i 	 = (i + 1) Mod 256
		 j 	 = (j + sbox(i)) Mod 256
		 temp  = sbox(i)
		 sbox(i)  = sbox(j)
		 sbox(j)  = temp
		 k 	 = sbox((sbox(i) + sbox(j)) Mod 256)
	     cipherby = Asc(Mid(plaintxt, a, 1)) Xor k
	     cipher  = cipher & Chr(cipherby)
	 Next

	 EnDeCrypt = cipher

End Function
'******************************************************************
'Convert a String to Hex values
'******************************************************************
function Ascii2Hex(strTemp)
	 if strTemp = "" or isNull(strTemp) then
		 Ascii2Hex = ""
	 else
		 dim I
		 for I = 1 to len(strTemp)
			 Ascii2Hex = Ascii2Hex & right("00" &
hex(asc(mid(strTemp,I,1))),2)
		 next
	 end if
end function
'******************************************************************
'Convert a Hex values to String
'******************************************************************
function Hex2Ascii(strTemp)
	 if strTemp = "" or isNull(strTemp) then
		 Hex2Ascii = ""
	 else
		 dim I
		 for I = 1 to len(strTemp) step 2
			 Hex2Ascii = Hex2Ascii & Chr(Eval("&H" &
Mid(strTemp,I,2)))
		 next
	 end if
end function

Messages 12382 - 12411 of 12411   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help