Thanks much, David. Those are all good suggestions and YES, I've now added
and addition debug to my main error handler mod. With ASP in MSIE, I almost
always get great feedback with the pointer showing me exactly what I may
have screwed up...but this is Word. So, although I've used this before...NOW
it's a part of my main debug:

'debug...capture query string for verification
gstrQuery = InputBox("This is the current SQL query string: ", "SQL
Testing", gstrSQLQuery)

Then I can easily copy it out of the input and paste into notepad. I can't
use Response.Write here because it can really mess up my template. Granted,
this was the most complicated query I've ever had to deal with...not much
for many of you I'm sure...but I'm learning! ;-)

Thanks for the advice and thanks much to everyone who offered help!


Dian ~


-----Original Message-----
From: David Smart [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 11, 2004 3:29 AM
To: [EMAIL PROTECTED]
Subject: Re: [ASP] Help deciphering SQL error


Dian

May I recommend a habit of mine.  I always code a response.write of my SQL
just above the execute.  Always - no exceptions.  Then I leave it in until
it becomes intrusive.  Then I comment it out, I never delete it.  When I
need it again, all I have to do is remove the comment flag.

For my Action pages (the ones that do the updates, inserts, deletes, etc,
and don't actually display anything to the user), I never bother to comment
them out as they never disturb the user.  Then, if an SQL statement crashes,
the user does get the browser page and the SQL is there to view without
further action.

Another trick ... the first thing I do in any language is to create a
potline subroutine whose job is to output text (passed as a parameter), with
enough stuff included to get a line break after the text - e.g. <br> for
JavaScript and ASP.  This means I can forget about which environment I'm in
(response.write?  document.write?  C++?  Pascal?  etc).  I also create a
"put" subroutine that outputs the text without the line break.  As well as
being easier to remember, and to type, my opinion is that they actually make
the code easier to read.

Given that I always call my SQL string variables "sql", all I have to type
is "putLine (sql);", which I almost do in my sleep these days.

Dave S
----- Original Message ----- 
From: "Dian D. Chapman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 11, 2004 4:13 PM
Subject: RE: [ASP] Help deciphering SQL error


>
> Thanks...most of the strings were being displayed in a msgbox, up until
this
> error. But as I just told Ray, I think I've narrowed it down. I had to
> resort to going back to Word 2k cos' 2003 started even giving me errors on
> code I'd commented out!<lol> Sheesh! Give me a break! ;-)
>
>
> Dian ~
>
>
> -----Original Message-----
> From: Shawn K. Hall [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 10, 2004 9:51 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [ASP] Help deciphering SQL error
>
>
> Hi Dian,
>
> > I'm about to pick this query from hell apart...
>
> Are you Response.Write'ing the SQL in your code before you receive
> the error? There's no way to be sure ASIDE from ensuring that the
> SQL is actually what you expect it to be, and this is only really
> possible by "Response.Write sSql" BEFORE you open or execute the
> SQL.
>
>
> > Error upon SQL query attempt:
> > "No value given for one or more parameters."
>
> It means that you are either using a parameterized query that is
> missing or misinterpreting a value, or that a SQL parameter is
> empty, leaving an equals with nothing after it:
>   eg, "WHERE (([something]='whatever') AND ([else]=))"
> Note that [else] doesn't have a value after the =.
>
> Regards,
>
> Shawn K. Hall
> http://ReliableAnswers.com/
>
> '// ========================================================
>    "For purposes of action, nothing is more useful than
>     narrowness of thought combined with energy of will."
> -- Henri Frederic Amiel, Swiss writer
>
>
>
>
>
> --------------------------------------------------------------------- 
>  Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
>  Post       : [EMAIL PROTECTED]
>  Subscribe  : [EMAIL PROTECTED]
>  Unsubscribe: [EMAIL PROTECTED]
> --------------------------------------------------------------------- 
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.289 / Virus Database: 265.4.8 - Release Date: 12/8/2004
>
>
> -- 
> This email scanned and certified clean by AVG!
> Checked by AVG Anti-Virus.
> Version: 7.0.289 / Virus Database: 265.4.8 - Release Date: 12/8/2004
>
>
>
>
>
> --------------------------------------------------------------------- 
>  Home       : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
>  Post       : [EMAIL PROTECTED]
>  Subscribe  : [EMAIL PROTECTED]
>  Unsubscribe: [EMAIL PROTECTED]
> --------------------------------------------------------------------- 
> Yahoo! Groups Links
>
>
>
>
>
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 5/12/2004




---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 




-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.8 - Release Date: 12/8/2004
 

-- 
This email scanned and certified clean by AVG!
Checked by AVG Anti-Virus.
Version: 7.0.289 / Virus Database: 265.4.8 - Release Date: 12/8/2004
 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to