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

DataGrid - almost have it

In Microsoft Access I make a new Access Project called
VipperSQL (Access 2000 file format). I construct a table
called Ante with 13 columns. One column called ID is the
primary key. Some columns have text data, others date
data and others numeric data. I add 10 rows of sample
data.
In Visual Studio I build a new Web Project in C#.
I place a DataGrid (named MyGrid) on the aspx page along
with an SQLConnection1, SQLDataAdapter1 and dataset
vippy11.
I place a statement: using System.Data.SqlClient; at the
top of the code page.
In the Page_Load event handler I place:
MyGrid.DataSource = vippy11.Ante;
MyGrid.DataBind();
I save and build the project.
I browse the aspx page in the browser, I get the correct
Column headings, but do not get the 10 rows of sample
data. What do I need to do to view my sample data in the
DataGrid ?
Thanks,
Jim
Nov 18 '05 #1
3 884
James McGivney wrote:
In Microsoft Access I make a new Access Project called
VipperSQL (Access 2000 file format). <snip> with an SQLConnection1, SQLDataAdapter1 and dataset
vippy11.


The problem is the Connection and DataAdapter objects you're using only
work with SQL Server. Switch to an OleDbConnection and OleDbDataAdapter
when using Access as a backend.

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
Nov 18 '05 #2
In a new web project I place a datagrid on the aspx page.
Configure an OleDBDataAdapter with dataSet11 connected to
a table in my Access Project.
Place the statement: using System.Data.OleDb; at the top
of the code page.
Place the statements in the Page_Load event handler.
DataGrid1.DataSource = dataSet11.AntMort;
DataGrid1.DataBind();
I view the aspx page in Explorer.
I still get the column headers but not the row data.
Any suggestions ?
Thanks in advance for your help.
Jim

-----Original Message-----
James McGivney wrote:
In Microsoft Access I make a new Access Project called
VipperSQL (Access 2000 file format).<snip>
with an SQLConnection1, SQLDataAdapter1 and dataset
vippy11.


The problem is the Connection and DataAdapter objects

you're using onlywork with SQL Server. Switch to an OleDbConnection and OleDbDataAdapterwhen using Access as a backend.

--
There are 10 kinds of people. Those who understand binary and those whodon't.

http://code.acadx.com
(Pull the pin to reply)
.

Nov 18 '05 #3
Hi James,

Based on my research and experience, the following article is useful to
this issue.

Walkthrough: Editing an Access Database with ADO.NET
http://www.microsoft.com/indonesia/m...wtaccessdb.asp
"...
Summary: This walkthrough demonstrates how to add, delete, and edit records
in a Microsoft? Access database with ADO.NET using a simple Visual C#?
code-behind Web application. (11 printed pages)
..."
Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.est

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #4

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

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
3
by: Dmitry Akselrod | last post by:
Hi, I am using a standard .NET 1.0 Datagrid. Actually, I am using two, bound to a master-detail relationship. Both DataGrids are bound to a datasource. I have the MSDN version of the...
6
by: StepUP | last post by:
I'm a long time developer in Access. Noticing the "Why do IT guys hate MS Access?" thread made me think of my recent experiences in experimenting with VB .Net, and specifically, the Datagrid...
0
by: Pietje de kort | last post by:
Hello, why is the System.Windows.Forms.DataGrid so un-customizable? I am trying to build a DataGrid that will resize it's last column when there is room left over (make it fill the total...
1
by: Krzysztof Karnicki | last post by:
I have such a problem… I have create my custom DataGridColumn inheriting from System.Windows.Forms.DataGridColumnStyle on using it on DataGrid, to show rows painted by me self. Because dates ...
0
by: bleedledeep | last post by:
I have a DataGrid that ends up with a VScrollBar due to the number of rows, and the behavior I want is for the bottom-most row of the DataGrid to be shown, i.e., I want the VScrollBar all the way...
1
by: Kepler | last post by:
I'm fighting a really strange bug that involves both a DataGrid and a Repeater disappearing on postback. The strange thing is that I've distilled the problem down to a simple program, that...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
3
by: RTT | last post by:
hey, i made a windows form where i created a datagrid with a datatable as it's datasource. now i want to supplie a save button to my users so the datagrid can be exported to excel. how can i do...
1
by: ECD | last post by:
Hello all, I can usually find solutions to my .NET problems by searching these groups, but I'm stumped on this one. I have a datagrid in VB.NET (2.0 framework). I want to disable sorting on...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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...

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.