Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 5th, 2007, 11:42 AM
Authorized User
 
Join Date: Aug 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to alirezaaali
Default Strange Error inh STRSQL

 I use the source code below:

<%
'read strings from export page
Dim strtilekind,strtilesize,strmosaic,strgranite
strtilekind=request.Form("tilekind")
strtilesize=request.Form("tilesize")
strmosaic=request.Form("mosaic")
strgranite=request.Form("granite")

Dim StrSQL
If strtilekind ="---" and strtilesize ="" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts ORDER BY sale_model_no ASC"
Else If strtilekind ="Floor" and strtilesize ="---" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Floor') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="---" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall') ORDER BY sale_model_no ASC"
Else If strtilekind ="Floor" and strtilesize ="15x45" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Floor' AND tile_size='15x45') ORDER BY sale_model_no ASC"
Else If strtilekind ="Floor" and strtilesize ="30x60" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Floor' AND tile_size='30x60') ORDER BY sale_model_no ASC"
Else If strtilekind ="Floor" and strtilesize ="33x33" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Floor' AND tile_size='33x33') ORDER BY sale_model_no ASC"
Else If strtilekind ="Floor" and strtilesize ="33x55" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Floor' AND tile_size='33x55') ORDER BY sale_model_no ASC"
Else If strtilekind ="Floor" and strtilesize ="40x40" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Floor' AND tile_size='40x40') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="15x15" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall' AND tile_size='15x15') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="20x20" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall' AND tile_size='20x20') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="20x25" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall' AND tile_size='20x25') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="20x30" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall' AND tile_size='20x30') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="25x25" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall' AND tile_size='25x25') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="25x33" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall' AND tile_size='25x33') ORDER BY sale_model_no ASC"
Else If strtilekind ="Wall" and strtilesize ="25x40" and strmosaic="---" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Wall' AND tile_size='25x40') ORDER BY sale_model_no ASC"
Else If strtilekind ="---" and strtilesize ="" and strmosaic="Press" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Mosaic' AND tile_size='Press') ORDER BY sale_model_no ASC"
Else If strtilekind ="---" and strtilesize ="" and strmosaic="Puzzel" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Mosaic' AND tile_size='Puzzel') ORDER BY sale_model_no ASC"
Else If strtilekind ="---" and strtilesize ="" and strmosaic="Elevation" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Mosaic' AND tile_size='Elevation') ORDER BY sale_model_no ASC"
Else If strtilekind ="---" and strtilesize ="" and strmosaic="Washbeton" and strgranite="---" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='Mosaic' AND tile_size='Washbeton') ORDER BY sale_model_no ASC"
Else If strtilekind ="---" and strtilesize ="" and strmosaic="---" and strgranite="Pepper&Salt" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='granite' AND tile_size='pepper&salt') ORDER BY sale_model_no ASC"
Else If strtilekind ="---" and strtilesize ="" and strmosaic="---" and strgranite="Solublesalt" then
    StrSQL="SELECT sale_model_no,type,tile_size,water_absorption,poli shed,varnished,firing _type,certifications,MOQ,available,other_sizes,col ores FROM tblproducts Where(type='granite' AND tile_size='Solublesalt') ORDER BY sale_model_no ASC"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

Dim ObjRS
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.open StrSQL,objconn
%>

and i get the error below :
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/ravimex/product_show.asp, line 79

I Really Love to learn ASP

I Really Love to learn ASP
__________________
I Really Love to learn ASP
 
Old August 5th, 2007, 11:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Code like this is pretty hard to debug, especially for others that didn't write it.

What may help is writing out the SQL statement before you execute it. E.g.:

Response.Write("Sql is " & StrSQL)
Response.End

What do you get? Does it look like a valid SQL statement?

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
strange error Iguchi Visual Studio 2008 1 April 11th, 2008 06:21 AM
An Strange Error alirezaaali Classic ASP Professional 1 August 16th, 2007 10:03 AM
Strange ERROR (?) myself Classic ASP Basics 16 June 22nd, 2006 06:39 AM
Strange Error !!! NinaWilliam ASP.NET 1.0 and 1.1 Basics 2 May 21st, 2006 01:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.