473,668 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Too few parameters. Expected 1

3 New Member
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/ShowJobDetailTe st.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 1832
ilearneditonline
130 Recognized Expert New Member
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/ShowJobDetailTe st.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
3019
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> <http://www.physci.org/test/003url/index.html?url=http://mybiz.com/&that=this&when=now#21> <http://www.physci.org/test/003url/index.html?url=http://mybiz.com/&when=now> Before I go offering it in public (and writing it into any number of the 'development kits'...
7
9473
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
2883
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 correctly. 3078" after I migrated "MS Access 2000" to "MS SQL Server 2000" and relinked all linked tables. The front-end interface of my application is MS Access 2000. The back-end is MS SQL Server 2000. After I migrated the database and
2
6665
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 'method' was expected At the lines:- myCommand.Parameters("@Username").Value = strLogonUsr;
14
3262
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 make things simpler and better readable I'd make all default parameters named parameters so that you can decide for yourself which one to pass and which not, rather than relying on massively overlaoded methods which hopefully provide the best...
0
8791
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8577
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2786
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.