Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > Other Programming - Perl, C++, Java, ASP, .NET Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-04-2006, 07:18 AM   #1 (permalink)
hoppy
Junior Member
 
Join Date: Sep 2006
Posts: 2
Default Format of SQL query within ASP statement

Hi there,

I have an SQL query within an ASP statement that is not parsing correctly for some very strange reason. When I try and parse the statement, it coms up with the error, 'Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.'

I have successfully run the query within MS Access. The SQL query that I ran in Access is below:

Code:
Code:
SELECT DISTINCT sculpturetype.type AS sculpture_type, artist.FirstName AS artist_firstname, artist.Surname AS artist_surname FROM (sculpturetype INNER JOIN sculptures ON sculptures.SculptureTypeID = sculpturetype.TypeURL) INNER JOIN artist ON artist.NameURL = sculptures.ArtistID WHERE sculpturetype.TypeURL = 'Art-Deco' ORDER BY artist.FirstName;


My full ASP statement that is parsing an error is :-

Code:
Code:
<% 'Dimension variables ' Database connection Set con = CreateObject("ADODB.Connection") con.Provider = "Microsoft.Jet.OLEDB.4.0" con.Open Server.MapPath("products.mdb") Set rs = CreateObject("ADODB.Recordset") 'Initialise the strSQL variable with an SQL statement to query the database strQL = "SELECT DISTINCT sculpturetype.type AS sculpture_type, artist.FirstName AS artist_firstname, artist.Surname AS artist_surname FROM (sculpturetype INNER JOIN sculptures ON sculptures.SculptureTypeID = sculpturetype.TypeURL) INNER JOIN artist ON artist.NameURL = sculptures.ArtistID WHERE sculpturetype.TypeURL = 'Art-Deco' ORDER BY artist.FirstName;" 'Response.Write 'Open the recordset with the SQL query rs.Open strSQL, Con Response.Write (rs.Fields("sculpture_type")) 'Reset server objects rs.Close Set rs = Nothing Set Con = Nothing %>


I would really appreciate some advice as to why my ASP statement is not working correctly. This has completely stumped me and I have no idea why it's not working.

Any advice or help is greatly appreciated

Kind Regards

James
hoppy is offline   Reply With Quote
Sponsored Links
Old 09-04-2006, 08:02 PM   #2 (permalink)
hoppy
Junior Member
 
Join Date: Sep 2006
Posts: 2
Default Re: Format of SQL query within ASP statement

All done and sorted - it had nothing to do with my SQL query but the format of my ASP statement
hoppy is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 05:28 AM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums