SunQuest
           ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 23rd, 2003, 08:43 AM
tipy tipy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 22 tipy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Execution of SQL Request : problem of Recordset

I have got a problem executing a query.
The driver indicates an error in Internet Explorer : No value given for one or more required parameters
It refers to the recordset definition.
I have tested the query in my DBMS, it works.

SOURCE :

Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= " & server.mappath (BDname) "

Dim StrSQL
StrSQL = " SELECT NOM FROM ATTRIBUT WHERE LIBELLE = TRUC"

Dim rcdSet
rcdSet = Server.CreateObject("ADODB.Recordset")
rcdSet.Open StrSQL, objConn , adOpenForwardOnly, adLockPessimistic

Reply With Quote
  #2  
Old July 23rd, 2003, 08:49 AM
fishman fishman is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: North Carolina
Posts: 9 fishman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Throw single quotes around truce
it is a string>>
if it was an int, you would not have to worry about it

should get it

Reply With Quote
  #3  
Old July 23rd, 2003, 09:15 AM
tipy tipy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 22 tipy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yes it is true that I have to put single quotes around TRUC. But the problem is still the same.
Thanks for help even though

Reply With Quote
  #4  
Old July 23rd, 2003, 09:25 AM
fishman fishman is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: North Carolina
Posts: 9 fishman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
const strMySQL_Conn = _
"PROVIDER=SQLOLEDB.1;DATA SOURCE=dataserverA;uid=Tax Admin;pwd=
FakePass;Initial Catalog=Tax System;"

call this sub everytime you want to use the db

sub OpenTaxConnMain
set connMain = Server.CreateObject("ADODB.Connection")
connMain.ConnectionString = strMySQL_Conn
connMain.Open
end sub

then when you define a qry say:
strsql = "select count(*) as count from tax_fields where acctNUM = 223 and ExpandedOrder_Parcel <> 0

set rsmain = connMain.Execute(strSQL, , adCmdText)


What else

Reply With Quote
  #5  
Old July 24th, 2003, 05:12 AM
tipy tipy is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 22 tipy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have tried your solution
But I obtain a syntax error on 'Sub OpenTaxConnMain'
It's a bit strange.
Just a question about the line :
const strMySQL_Conn = _
"PROVIDER=SQLOLEDB.1;DATA SOURCE=dataserverA;uid=Tax Admin;pwd=
FakePass;Initial Catalog=Tax System;"
Your data source is the name of your DB? Or the ODBC link?

Reply With Quote
  #6  
Old July 24th, 2003, 07:43 AM
fishman fishman is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: North Carolina
Posts: 9 fishman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
const strMysql_Conn = _
"PROVIDER=SQLOLEDB.1;DATA SOURCE=dataserverA;uid=Tax Admin;pwd=
FakePass;Initial Catalog=Tax System;"

data source is the name of my database server (microsoft sql server)

here is the connection for access---That is what you are using right?

Private Const strAccess_Conn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Jet OLEDB:Engine Type=5;Data Source=C:\DatabaseName.mdb"


when opening your db just call the sub
OpenTaxConnMain
to connect

then run any sql you want with
set rsmain = connMain.Execute(strSQL, , adCmdText)

after the qry

email back if anything else

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Execution of SQL Request : problem of Recordset


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway