473,440 Members | 1,671 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,440 software developers and data experts.

How can configure parameter when OledbDataadapter was created with wizard

Dear friends;

I am trying to cofigure Oledbdatadabter with wizard. And i am using ACCESS
database.I want to use parameter in OledbDataadapter Select Command Property
window.
I have simple form which has a one combobox, one datagrid and one update
button. I want make select like this Select * from Banks where BankName=
combobox.text but if i write Select * from Banks where BankName='CITIBANK'
query is working. But i can not take parameters from combobox.
In OledbDataadapter Select Command Property window i see Parameters Property
but i can not configure it.

If u can please help me about my trouble.

Thanks a lot
--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #1
1 4847
Hi,

"Herman P via DotNetMonster.com" <u12289@uwe> wrote in message
news:56bb288b74c53@uwe...
Dear friends;

I am trying to cofigure Oledbdatadabter with wizard. And i am using ACCESS
database.I want to use parameter in OledbDataadapter Select Command
Property
window.
I have simple form which has a one combobox, one datagrid and one update
button. I want make select like this Select * from Banks where BankName=
combobox.text but if i write Select * from Banks where BankName='CITIBANK'
Configure the OleDbDataAdapter with a query like "SELECT * FROM Banks WHERE
BankName = ?". Then before you fill the DataSet or DataTable you can set
the parameter value to your combobox.text :

OleDbDataAdapter1.SelectCommand.Parameters("BankNa me").Value = ComboBox.Text
OleDbDataAdapter1.Fill ( ... )

You will probely want to call this code from a ComboBox.SelectedIndexChanged
eventhandler.

HTH,
Greetings
query is working. But i can not take parameters from combobox.
In OledbDataadapter Select Command Property window i see Parameters
Property
but i can not configure it.

If u can please help me about my trouble.

Thanks a lot
--
Message posted via http://www.dotnetmonster.com

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kruno Milicevic | last post by:
I want to fill DataGrid with some table from my database. I usual use something like this: string sqlString ="SELECT * FROM TableName"; OleDbCommand myOleDbCommand = new OleDbCommand(sqlString ,...
4
by: Matt Sawyer | last post by:
I am attempting to use an API (CxApiOem.dll) that has a large number of defines and complicated structs. It's just too much hassle to attempt to use DLLImport to make the desired API calls. ...
2
by: Lee Silver | last post by:
Environment: W2K SP3 and .NET 1.1 I'm trying to set my machine up to do some Web-form development but am unable to successfully configure the IIS Extensions. When I click Finish at the end of the...
2
by: dio | last post by:
Hi there, I'm trying to create an OleDBDataAdapter with a command that will receive a parameter to act as a filter on the query. I'm using the Query Builder wizard and it works fine, unless I...
7
by: Britney | last post by:
Original code: this.oleDbSelectCommand1.CommandText = "SELECT TOP 100 user_id, password, nick_name, sex, age, has_picture, city, state, " + "country FROM dbo.users WHERE (has_picture = ?) AND (sex...
0
by: Siegfried Heintze | last post by:
This program works fine on my desktop when I grant full control of the MSAccess database to everyone. However, when I put it on my hosting service with no impersonation, I now get this error (see...
5
by: nitromuse | last post by:
Can you please tell me how to configure the adapter (DATA SOURCE AND PROVIDER) for a data table that I generated myself as a DataTable. It was easy to create it but now accessing it isn't. YOUR...
1
by: Hugh Barnett | last post by:
I am using Visual Studio to create a VB .NET application to run on Windows 2000. I am trying to display data from a Sybase ASA table in a form, allow the user to update the data in the form, and...
14
by: david | last post by:
I have developed web forms including login by using ASP.NET via HTTP. Now I want to secure the connection from client to the server via HTTPS. How can I configure the server or something else to...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.