473,396 Members | 1,678 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.

Parameterised queries

7
Hi,

I am getting an error message saying:

“No value given for one or more required parameters.” And it points to this line
command.ExecuteNonQuery()

I am not sure what this means. The code I used is below:


Expand|Select|Wrap|Line Numbers
  1. With command.Parameters
  2.  
  3.                     .Add(New OleDbParameter("@Firstname", FirstName.Text))
  4.  
  5.                     .Add(New OleDbParameter("@LastName", LastName.Text))
  6.  
  7.                     .Add(New OleDbParameter("@Address", Address.Text))
  8.  
  9.                     .Add(New OleDbParameter("@Country", Country.Text))
  10.  
  11.                     .Add(New OleDbParameter("@PhoneNo", PhoneNo.Text))
  12.  
  13.                     .Add(New OleDbParameter("@Email", Email.Text))
  14.  
  15.                     .Add(New OleDbParameter("@UserName1", UserName1.Text))
  16.  
  17.                     .Add(New OleDbParameter("@Password1", Password1.Text))
  18.  
  19.                 End With
  20.  
  21.  
  22.  
  23.                 cmdText = "INSERT INTO Customer (FirstName, LastName, Address, Country, PhoneNo, Email, UserName, [Password]) VALUES (@FirstName,@LastName,@Address,@Country,@PhoneNo,@Email,@UserName1,@Password1)"
  24.  
  25.                 command = New OleDbCommand(cmdText, myConnection)
  26.  
  27.                 command.ExecuteNonQuery()
  28.  
  29.                 Response.Redirect("RegistrationApproved.aspx")
can you help me please?
Aug 8 '08 #1
0 746

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

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
9
by: Phil Sowden | last post by:
I'd really appreciate your help creating a parameterised view in SQL Server, which I can then invoke from VB5. I'm using DAO and ODBC to connect to SQL Server 2000. I can open Tables and Views,...
2
by: John | last post by:
Hi New to sql server. using beta2 2005. What is the way to implement parameterised queries? I need the queries to be updatable as these would work as recordsets that vb.net forms will be bound...
1
by: Roger Green | last post by:
I have inherited a complex database that has many dozens of queries that derive data from a people table. I now need to be able to run these queries (from within a significant number of forms)...
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
5
by: Tim Marsden | last post by:
Hello, I am building a parameterised query in vb.net for execution against a SQL server database. I am using a OLEDB command and OLEDB parameters. If one of the parameters is a date I sometimes...
3
by: shearichard | last post by:
Hi - I've got SQL that looks like this ... cursor = self.MySQLDb_conn.cursor(cursorclass=MySQLdb.cursors.DictCursor) sqlQuery = "SELECT * FROM T1 WHERE C1 = %s and C2 = %s" sql =...
2
by: B.r.K.o.N.j.A | last post by:
I'm using mysql 4.1 and php5.0.4. Since (AFAIK) this version of mysql supports parameterised queries, is there a way to accomplish that using mysql_... functions (looks like mysql client library is...
5
by: John | last post by:
Hi I have a parameterised query for a report like this; PARAMETERS Event_ID Short; SELECT DISTINCTROW Events., ... FROM Events WHERE (((Events.)=)); Now I am trying to run the report...
1
by: DebGuria | last post by:
I have written a managed C++ dll. I have to use that dll from C#, VB .NET and VB. It has got a parameterised propetyfor the very specific requirement. For example get_Pie(float f). When I am...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.