473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Too few parameters. Expected 1

Hi all,
I got one more prob in another ASP page linked to the earlier one. I've created an Access DB and created a query using Access Query wizard. The query is running fine in Access and it is showing me the right Record each time. But when I'm taking this query in ASP page it is giving me this Err:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/imagine/ShowJobDetailTest.asp, line 36

Dont know whats the prob over here also.
Anyone could plz help me. I know the mistake is in my ASP codes. So plz help me out to find the cause for it.

Thanks in Advance,
Javed.

Expand|Select|Wrap|Line Numbers
  1. <%
  2.     Dim objDbConn
  3.     Set objDbConn = Server.CreateObject("ADODB.Connection")
  4.     objDbConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" & _
  5.     "DBQ=F:\Imagineer\html\career.mdb"
  6.     objDbConn.Open
  7.     %>
  8.  
  9.     <%
  10.     Dim strSQL, objRS    
  11.  
  12.     strSQL = "SELECT JobDetail.Job_Ref, JobDetail.Job_Descrip, " & _
  13.     "JobDetail.Job_Skills, JobDetail.Add_Info, JobTitle.Job_Title " & _
  14.     "FROM JobTitle INNER JOIN JobDetail ON " & _
  15.     "JobTitle.Job_Ref = JobDetail.Job_Ref WHERE " & _
  16.     "(((JobDetail.Job_Ref)=(Select Job_Ref from JobTitle where Job_Ref = ""CFC0031"")))"
  17.  
  18.     Set objRS = Server.CreateObject("ADODB.Recordset")
  19.     objRS.open strSQL, objDbConn, adOpenForwardOnly, adLockReadOnly, adCmdText  (This is Line Num: 36)
  20.     %>
  21.  
  22.  
  23.     <%
  24.         Response.write "Job Title: " & objRS.Fields("Job_Title") & "<BR>"
  25.         Response.write "Job Reference: " & objRS.Fields("Job_Ref") & "<BR><BR>"
  26.  
  27.         Response.write "Job Description: " & objRS.Fields("Job_Descrip") & "<BR><BR>"
  28.  
  29.         Response.write "Job Skills: " & objRS.Fields("Job_Skills") & "<BR><BR>"
  30.  
  31.         Response.write "Additional Information: " & objRS.Fields("Add_Info")
  32.     %>
  33.  
  34.     <%
  35.     objRS.Close
  36.     Set objRS = Nothing
  37.     %>
Jul 23 '07 #1
1 1824
ilearneditonline
130 Expert 100+
Hi all,
I got one more prob in another ASP page linked to the earlier one. I've created an Access DB and created a query using Access Query wizard. The query is running fine in Access and it is showing me the right Record each time. But when I'm taking this query in ASP page it is giving me this Err:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/imagine/ShowJobDetailTest.asp, line 36

Dont know whats the prob over here also.
Anyone could plz help me. I know the mistake is in my ASP codes. So plz help me out to find the cause for it.

Thanks in Advance,
Javed.
Try this, i just cleaned up the SQL so that it was easier to look at.

Expand|Select|Wrap|Line Numbers
  1.  
  2. "SELECT a.Job_Ref, a.Job_Descrip, " & _ 
  3. "a.Job_Skills, a.Add_Info, b.Job_Title " & _ 
  4. "FROM JobTitle b INNER JOIN JobDetail a ON " & _ 
  5. "b.Job_Ref = a.Job_Ref WHERE " & _ 
  6. "a.Job_Ref = (Select Job_Ref from JobTitle where Job_Ref = \"CFC0031\")"
  7.  
Jul 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Andrew Thompson | last post by:
I have written a few scripts to parse the URL arguments and either list them or allow access to the value of any parameter by name. <http://www.physci.org/test/003url/index.html>...
7
by: Dee | last post by:
Running an AfterUpdate event procedure, I get the following error: "Too few parameters. Expected 1." My code is as follows: Private Sub DealerID_AfterUpdate() Dim db As DAO.Database
1
by: bonnie.tangyn | last post by:
Hello all I get Too few parameters expected 2 error and "The MS Jet Database engine cannot find the input table or query "myTempTablename". Make sure it exists and that its name is spelled...
2
by: Patrick Olurotimi Ige | last post by:
I converted the code below from VB.NET to C# cos i have to add it to a C# application!! But i'm getting the error:- System.Data.SqlClient.SqlCommand.Parameters' denotes a 'property' where a...
14
by: cody | last post by:
I got a similar idea a couple of months ago, but now this one will require no change to the clr, is relatively easy to implement and would be a great addition to C# 3.0 :) so here we go.. To...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.