473,406 Members | 2,894 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,406 software developers and data experts.

problem populating a grid with ODBCDataAdapter

hiL i have teh following code:

string query = "select * FROM users";
OdbcCommand command = new OdbcCommand(query,
conn);
OdbcDataAdapter da = new OdbcDataAdapter();
da.SelectCommand = command;
DataSet ds = new DataSet();
da.Fill(ds, "users" );
DataGrid1.DataSource = ds.Tables["users"];

the connection is working adn open already however the datagrid is not
been populated
any ideas why? or a better way to do this?

thanks
Nov 23 '07 #1
0 1464

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

Similar topics

0
by: Giulio Santorini | last post by:
Hi, I've got two drop down list controls. When I select a value from the first one I fill the second one. And when I select a value from the second one I would like to fill another control. But...
0
by: Steve Bishop | last post by:
I have a form with a search text box and a grid that displays the results. Within the grid, I have edit command links set up to response.redirect to another page that puts the DataKey value in the...
1
by: TomislaW | last post by:
This is the code: OdbcConnection conn = new OdbcConnection(m_ConnectionString); OdbcDataAdapter adapter = new OdbcDataAdapter(); adapter.SelectCommand = new OdbcCommand("spUser", conn); ...
4
by: Larry Grady | last post by:
Anyone up for a challenge? I've been struggling with this for a few days and was hoping someone could help me. Pouring through all the messageboards I just can't find the solution. We have a...
1
by: sbreytberg | last post by:
Hi all, I am a newbie at dotnet. Been going through someone else's code and here's a problem: I am loading a csv file into the database. When there's more than one record, it works fine, but...
0
by: jdrott1 | last post by:
'i'm trying to populate a dropdown list from a column in an odbc connection. this is what i have so far and i seem to be lost. i don't understand how to go from the data adapter to populating the...
2
by: monteiro | last post by:
Hi, I am using OdbcDataAdapter to insert data to postgreeSQL.. Everything’s seems to be fine, but nothing is inserting in the database. Andy Idea?? Thanks in advance string selectCommand =...
0
by: Eric B. | last post by:
I am populating a DataGrid with many rows. As it is populating I see the scrollbar flying but no rows pop up until it is finished. Is there a way to make each row draw as soon as it is...
0
by: sandeepkavade | last post by:
Hi, I am basically a VC++ developer but now working on C#. I am having a assembly in that i have added a UserControl and on that UserControl I am having a tree-view control and Property Grid...
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: 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
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
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
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,...

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.