By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,663 Members | 2,152 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,663 IT Pros & Developers. It's quick & easy.

vstudio data access problems

P: n/a
I hate to cross post, but I've gotten no answer yet on a problem I'm having
with visual studio 2008.

I've created a series of forms with controls to access a Access database
tables. The connection string works fine and the tables are added to the
project without a problem.

When I create the tables they appear to bind and I am able to preview the
data in the database in design mode; however, at runtime no data is
displayed and the dataviewgrids don't allow me to update the tables.

I'm currently using C#, but have tried the same application in Visual Basic
with the same results.

I've also tried re-creating the application (at least one of the windows
forms) on a different computer with the same results. Not able to display
the access tables.. As well as with SSCE as the data source.

I've checked MSDN and stepped through the Walkthroughs with no success.

Has anyone else seen this problem or provide me some guidance.

Oct 11 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Post your code with sample data.

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...
I hate to cross post, but I've gotten no answer yet on a problem I'm
having with visual studio 2008.

I've created a series of forms with controls to access a Access database
tables. The connection string works fine and the tables are added to the
project without a problem.

When I create the tables they appear to bind and I am able to preview the
data in the database in design mode; however, at runtime no data is
displayed and the dataviewgrids don't allow me to update the tables.

I'm currently using C#, but have tried the same application in Visual
Basic with the same results.

I've also tried re-creating the application (at least one of the windows
forms) on a different computer with the same results. Not able to display
the access tables.. As well as with SSCE as the data source.

I've checked MSDN and stepped through the Walkthroughs with no success.

Has anyone else seen this problem or provide me some guidance.
Oct 11 '08 #2

P: n/a
Thanks.
===frmMain.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}

private void miFileClose_Click(object sender, EventArgs e)
{
Close();
}

private void miFormsRegister_Click(object sender, EventArgs e)
{
// frmRegister Registration = new frmRegister();
frmRegistration Registration = new frmRegistration();
Registration.MdiParent = this;
Registration.Show();

}

private void miFormsClubs_Click(object sender, EventArgs e)
{
frmClubs Clubs = new frmClubs();
Clubs.MdiParent = this;
Clubs.Show();
}

private void miFormsLedger_Click(object sender, EventArgs e)
{
frmLedger Ledger = new frmLedger(); ;
Ledger.MdiParent = this;
Ledger.Show();
}
}
}

====frmLedger.cs

sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmLedger : Form
{
public frmLedger()
{
InitializeComponent();
}

private void frmLedger_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the
'awanaDataSet.Ledger' table. You can move, or remove it, as needed.
this.LedgerTA.Fill(this.awanaDataSet.Ledger);

}
}
}

===>frmLedger.Designer.cs
namespace ACRMS
{
partial class frmLedger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typ eof(frmLedger));
this.statLedger = new System.Windows.Forms.StatusStrip();
this.dgvLedger = new System.Windows.Forms.DataGridView();
this.awanaDataSet = new ACRMS.AwanaDataSet();
this.LedgerBS = new
System.Windows.Forms.BindingSource(this.components );
this.LedgerTA = new
ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter ();
this.iDDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.aDateDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.descriptionDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.debitDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.creditDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.Balance = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.commentsDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.d gvLedger)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.a wanaDataSet)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.L edgerBS)).BeginInit();
this.SuspendLayout();
//
// statLedger
//
this.statLedger.Location = new System.Drawing.Point(0, 177);
this.statLedger.Name = "statLedger";
this.statLedger.Size = new System.Drawing.Size(488, 22);
this.statLedger.TabIndex = 0;
this.statLedger.Text = "statusStrip1";
//
// dgvLedger
//
this.dgvLedger.AutoGenerateColumns = false;
this.dgvLedger.ColumnHeadersHeightSizeMode =
System.Windows.Forms.DataGridViewColumnHeadersHeig htSizeMode.AutoSize;
this.dgvLedger.Columns.AddRange(new
System.Windows.Forms.DataGridViewColumn[] {
this.iDDataGridViewTextBoxColumn,
this.aDateDataGridViewTextBoxColumn,
this.descriptionDataGridViewTextBoxColumn,
this.debitDataGridViewTextBoxColumn,
this.creditDataGridViewTextBoxColumn,
this.Balance,
this.commentsDataGridViewTextBoxColumn});
this.dgvLedger.DataSource = this.LedgerBS;
this.dgvLedger.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvLedger.Location = new System.Drawing.Point(0, 0);
this.dgvLedger.Name = "dgvLedger";
this.dgvLedger.Size = new System.Drawing.Size(488, 177);
this.dgvLedger.TabIndex = 1;
//
// awanaDataSet
//
this.awanaDataSet.DataSetName = "AwanaDataSet";
this.awanaDataSet.SchemaSerializationMode =
System.Data.SchemaSerializationMode.IncludeSchema;
//
// LedgerBS
//
this.LedgerBS.DataMember = "Ledger";
this.LedgerBS.DataSource = this.awanaDataSet;
//
// LedgerTA
//
this.LedgerTA.ClearBeforeFill = true;
//
// iDDataGridViewTextBoxColumn
//
this.iDDataGridViewTextBoxColumn.DataPropertyName = "ID";
this.iDDataGridViewTextBoxColumn.HeaderText = "ID";
this.iDDataGridViewTextBoxColumn.Name =
"iDDataGridViewTextBoxColumn";
this.iDDataGridViewTextBoxColumn.Visible = false;
//
// aDateDataGridViewTextBoxColumn
//
this.aDateDataGridViewTextBoxColumn.DataPropertyNa me = "ADate";
dataGridViewCellStyle1.Format = "d";
dataGridViewCellStyle1.NullValue = null;
this.aDateDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle1;
this.aDateDataGridViewTextBoxColumn.HeaderText = "Date";
this.aDateDataGridViewTextBoxColumn.Name =
"aDateDataGridViewTextBoxColumn";
this.aDateDataGridViewTextBoxColumn.Width = 75;
//
// descriptionDataGridViewTextBoxColumn
//
this.descriptionDataGridViewTextBoxColumn.DataProp ertyName =
"Description";
this.descriptionDataGridViewTextBoxColumn.HeaderTe xt =
"Description";
this.descriptionDataGridViewTextBoxColumn.Name =
"descriptionDataGridViewTextBoxColumn";
this.descriptionDataGridViewTextBoxColumn.Width = 150;
//
// debitDataGridViewTextBoxColumn
//
this.debitDataGridViewTextBoxColumn.DataPropertyNa me = "Debit";
dataGridViewCellStyle2.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle2.Format = "N2";
dataGridViewCellStyle2.NullValue = "0";
this.debitDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle2;
this.debitDataGridViewTextBoxColumn.HeaderText = "Debit";
this.debitDataGridViewTextBoxColumn.Name =
"debitDataGridViewTextBoxColumn";
this.debitDataGridViewTextBoxColumn.Resizable =
System.Windows.Forms.DataGridViewTriState.False;
this.debitDataGridViewTextBoxColumn.Width = 60;
//
// creditDataGridViewTextBoxColumn
//
this.creditDataGridViewTextBoxColumn.DataPropertyN ame =
"Credit";
dataGridViewCellStyle3.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle3.Format = "N2";
dataGridViewCellStyle3.NullValue = "0";
this.creditDataGridViewTextBoxColumn.DefaultCellSt yle =
dataGridViewCellStyle3;
this.creditDataGridViewTextBoxColumn.HeaderText = "Credit";
this.creditDataGridViewTextBoxColumn.Name =
"creditDataGridViewTextBoxColumn";
this.creditDataGridViewTextBoxColumn.Width = 60;
//
// Balance
//
dataGridViewCellStyle4.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle4.Format = "N2";
dataGridViewCellStyle4.NullValue = "0";
this.Balance.DefaultCellStyle = dataGridViewCellStyle4;
this.Balance.HeaderText = "Balance";
this.Balance.Name = "Balance";
//
// commentsDataGridViewTextBoxColumn
//
this.commentsDataGridViewTextBoxColumn.DataPropert yName =
"Comments";
this.commentsDataGridViewTextBoxColumn.HeaderText = "Comments";
this.commentsDataGridViewTextBoxColumn.Name =
"commentsDataGridViewTextBoxColumn";
this.commentsDataGridViewTextBoxColumn.Visible = false;
this.commentsDataGridViewTextBoxColumn.Width = 250;
//
// frmLedger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(488, 199);
this.Controls.Add(this.dgvLedger);
this.Controls.Add(this.statLedger);
this.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$this. Icon")));
this.MaximizeBox = false;
this.Name = "frmLedger";
this.Text = "Ledger";
this.Load += new System.EventHandler(this.frmLedger_Load);
((System.ComponentModel.ISupportInitialize)(this.d gvLedger)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.a wanaDataSet)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.L edgerBS)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.StatusStrip statLedger;
private System.Windows.Forms.DataGridView dgvLedger;
private AwanaDataSet awanaDataSet;
private System.Windows.Forms.BindingSource LedgerBS;
private ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter LedgerTA;
private System.Windows.Forms.DataGridViewTextBoxColumn
iDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
aDateDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
descriptionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
debitDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
creditDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn Balance;
private System.Windows.Forms.DataGridViewTextBoxColumn
commentsDataGridViewTextBoxColumn;
}
}

I've had this minimal code load the table in prior versions of both VB as
well as C#. At this stage I've done no more than insure the table is
correctly loaded before proceeding further. One record exists in this table
and it is not loaded. The bindingNav is actually greyed out and record count
is 0.

This is the data in the table to be loaded.

"ID","ADate","Description","Debit","Credit","Comme nts"
1,10/3/2008 0:00:00,"Dues",$67.00,$0.00,
"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote in
message news:26**********************************@microsof t.com...
Post your code with sample data.

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...
>I hate to cross post, but I've gotten no answer yet on a problem I'm
having with visual studio 2008.

I've created a series of forms with controls to access a Access database
tables. The connection string works fine and the tables are added to the
project without a problem.

When I create the tables they appear to bind and I am able to preview the
data in the database in design mode; however, at runtime no data is
displayed and the dataviewgrids don't allow me to update the tables.

I'm currently using C#, but have tried the same application in Visual
Basic with the same results.

I've also tried re-creating the application (at least one of the windows
forms) on a different computer with the same results. Not able to display
the access tables.. As well as with SSCE as the data source.

I've checked MSDN and stepped through the Walkthroughs with no success.

Has anyone else seen this problem or provide me some guidance.
Oct 11 '08 #3

P: n/a
Your code does not compile. Did you review this link? I'm calling in Jon to
yell at you.
Review the instructions here.
http://www.yoda.arachsys.com/csharp/complete.html

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:e8**************@TK2MSFTNGP06.phx.gbl...
Thanks.
===frmMain.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}

private void miFileClose_Click(object sender, EventArgs e)
{
Close();
}

private void miFormsRegister_Click(object sender, EventArgs e)
{
// frmRegister Registration = new frmRegister();
frmRegistration Registration = new frmRegistration();
Registration.MdiParent = this;
Registration.Show();

}

private void miFormsClubs_Click(object sender, EventArgs e)
{
frmClubs Clubs = new frmClubs();
Clubs.MdiParent = this;
Clubs.Show();
}

private void miFormsLedger_Click(object sender, EventArgs e)
{
frmLedger Ledger = new frmLedger(); ;
Ledger.MdiParent = this;
Ledger.Show();
}
}
}

====frmLedger.cs

sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmLedger : Form
{
public frmLedger()
{
InitializeComponent();
}

private void frmLedger_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the
'awanaDataSet.Ledger' table. You can move, or remove it, as needed.
this.LedgerTA.Fill(this.awanaDataSet.Ledger);

}
}
}

===>frmLedger.Designer.cs
namespace ACRMS
{
partial class frmLedger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typ eof(frmLedger));
this.statLedger = new System.Windows.Forms.StatusStrip();
this.dgvLedger = new System.Windows.Forms.DataGridView();
this.awanaDataSet = new ACRMS.AwanaDataSet();
this.LedgerBS = new
System.Windows.Forms.BindingSource(this.components );
this.LedgerTA = new
ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter ();
this.iDDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.aDateDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.descriptionDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.debitDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.creditDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.Balance = new
System.Windows.Forms.DataGridViewTextBoxColumn();
this.commentsDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn();

((System.ComponentModel.ISupportInitialize)(this.d gvLedger)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this.a wanaDataSet)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this.L edgerBS)).BeginInit();
this.SuspendLayout();
//
// statLedger
//
this.statLedger.Location = new System.Drawing.Point(0, 177);
this.statLedger.Name = "statLedger";
this.statLedger.Size = new System.Drawing.Size(488, 22);
this.statLedger.TabIndex = 0;
this.statLedger.Text = "statusStrip1";
//
// dgvLedger
//
this.dgvLedger.AutoGenerateColumns = false;
this.dgvLedger.ColumnHeadersHeightSizeMode =
System.Windows.Forms.DataGridViewColumnHeadersHeig htSizeMode.AutoSize;
this.dgvLedger.Columns.AddRange(new
System.Windows.Forms.DataGridViewColumn[] {
this.iDDataGridViewTextBoxColumn,
this.aDateDataGridViewTextBoxColumn,
this.descriptionDataGridViewTextBoxColumn,
this.debitDataGridViewTextBoxColumn,
this.creditDataGridViewTextBoxColumn,
this.Balance,
this.commentsDataGridViewTextBoxColumn});
this.dgvLedger.DataSource = this.LedgerBS;
this.dgvLedger.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvLedger.Location = new System.Drawing.Point(0, 0);
this.dgvLedger.Name = "dgvLedger";
this.dgvLedger.Size = new System.Drawing.Size(488, 177);
this.dgvLedger.TabIndex = 1;
//
// awanaDataSet
//
this.awanaDataSet.DataSetName = "AwanaDataSet";
this.awanaDataSet.SchemaSerializationMode =
System.Data.SchemaSerializationMode.IncludeSchema;
//
// LedgerBS
//
this.LedgerBS.DataMember = "Ledger";
this.LedgerBS.DataSource = this.awanaDataSet;
//
// LedgerTA
//
this.LedgerTA.ClearBeforeFill = true;
//
// iDDataGridViewTextBoxColumn
//
this.iDDataGridViewTextBoxColumn.DataPropertyName = "ID";
this.iDDataGridViewTextBoxColumn.HeaderText = "ID";
this.iDDataGridViewTextBoxColumn.Name =
"iDDataGridViewTextBoxColumn";
this.iDDataGridViewTextBoxColumn.Visible = false;
//
// aDateDataGridViewTextBoxColumn
//
this.aDateDataGridViewTextBoxColumn.DataPropertyNa me = "ADate";
dataGridViewCellStyle1.Format = "d";
dataGridViewCellStyle1.NullValue = null;
this.aDateDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle1;
this.aDateDataGridViewTextBoxColumn.HeaderText = "Date";
this.aDateDataGridViewTextBoxColumn.Name =
"aDateDataGridViewTextBoxColumn";
this.aDateDataGridViewTextBoxColumn.Width = 75;
//
// descriptionDataGridViewTextBoxColumn
//
this.descriptionDataGridViewTextBoxColumn.DataProp ertyName =
"Description";
this.descriptionDataGridViewTextBoxColumn.HeaderTe xt =
"Description";
this.descriptionDataGridViewTextBoxColumn.Name =
"descriptionDataGridViewTextBoxColumn";
this.descriptionDataGridViewTextBoxColumn.Width = 150;
//
// debitDataGridViewTextBoxColumn
//
this.debitDataGridViewTextBoxColumn.DataPropertyNa me = "Debit";
dataGridViewCellStyle2.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle2.Format = "N2";
dataGridViewCellStyle2.NullValue = "0";
this.debitDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle2;
this.debitDataGridViewTextBoxColumn.HeaderText = "Debit";
this.debitDataGridViewTextBoxColumn.Name =
"debitDataGridViewTextBoxColumn";
this.debitDataGridViewTextBoxColumn.Resizable =
System.Windows.Forms.DataGridViewTriState.False;
this.debitDataGridViewTextBoxColumn.Width = 60;
//
// creditDataGridViewTextBoxColumn
//
this.creditDataGridViewTextBoxColumn.DataPropertyN ame =
"Credit";
dataGridViewCellStyle3.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle3.Format = "N2";
dataGridViewCellStyle3.NullValue = "0";
this.creditDataGridViewTextBoxColumn.DefaultCellSt yle =
dataGridViewCellStyle3;
this.creditDataGridViewTextBoxColumn.HeaderText = "Credit";
this.creditDataGridViewTextBoxColumn.Name =
"creditDataGridViewTextBoxColumn";
this.creditDataGridViewTextBoxColumn.Width = 60;
//
// Balance
//
dataGridViewCellStyle4.Alignment =
System.Windows.Forms.DataGridViewContentAlignment. MiddleRight;
dataGridViewCellStyle4.Format = "N2";
dataGridViewCellStyle4.NullValue = "0";
this.Balance.DefaultCellStyle = dataGridViewCellStyle4;
this.Balance.HeaderText = "Balance";
this.Balance.Name = "Balance";
//
// commentsDataGridViewTextBoxColumn
//
this.commentsDataGridViewTextBoxColumn.DataPropert yName =
"Comments";
this.commentsDataGridViewTextBoxColumn.HeaderText = "Comments";
this.commentsDataGridViewTextBoxColumn.Name =
"commentsDataGridViewTextBoxColumn";
this.commentsDataGridViewTextBoxColumn.Visible = false;
this.commentsDataGridViewTextBoxColumn.Width = 250;
//
// frmLedger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(488, 199);
this.Controls.Add(this.dgvLedger);
this.Controls.Add(this.statLedger);
this.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$this. Icon")));
this.MaximizeBox = false;
this.Name = "frmLedger";
this.Text = "Ledger";
this.Load += new System.EventHandler(this.frmLedger_Load);

((System.ComponentModel.ISupportInitialize)(this.d gvLedger)).EndInit();

((System.ComponentModel.ISupportInitialize)(this.a wanaDataSet)).EndInit();

((System.ComponentModel.ISupportInitialize)(this.L edgerBS)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.StatusStrip statLedger;
private System.Windows.Forms.DataGridView dgvLedger;
private AwanaDataSet awanaDataSet;
private System.Windows.Forms.BindingSource LedgerBS;
private ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter
LedgerTA;
private System.Windows.Forms.DataGridViewTextBoxColumn
iDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
aDateDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
descriptionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
debitDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
creditDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn Balance;
private System.Windows.Forms.DataGridViewTextBoxColumn
commentsDataGridViewTextBoxColumn;
}
}

I've had this minimal code load the table in prior versions of both VB as
well as C#. At this stage I've done no more than insure the table is
correctly loaded before proceeding further. One record exists in this
table
and it is not loaded. The bindingNav is actually greyed out and record
count
is 0.

This is the data in the table to be loaded.

"ID","ADate","Description","Debit","Credit","Comme nts"
1,10/3/2008 0:00:00,"Dues",$67.00,$0.00,
"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote in
message news:26**********************************@microsof t.com...
>Post your code with sample data.

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...
>>I hate to cross post, but I've gotten no answer yet on a problem I'm
having with visual studio 2008.

I've created a series of forms with controls to access a Access database
tables. The connection string works fine and the tables are added to the
project without a problem.

When I create the tables they appear to bind and I am able to preview
the
data in the database in design mode; however, at runtime no data is
displayed and the dataviewgrids don't allow me to update the tables.

I'm currently using C#, but have tried the same application in Visual
Basic with the same results.

I've also tried re-creating the application (at least one of the windows
forms) on a different computer with the same results. Not able to
display
the access tables.. As well as with SSCE as the data source.

I've checked MSDN and stepped through the Walkthroughs with no success.

Has anyone else seen this problem or provide me some guidance.
Oct 12 '08 #4

P: n/a
:'-]

I would love to be able to provide all aspects of the program, but trying
to do so would me I'm uploading quite a bit of code (which by the way I
tried).

So let me see if I can explain what I'm doing rather than upload what is
unloadable.

I've got an Access 2007 database created with some pretty generic tables
(replicating a database I created in SQL two years ago that got lost).

I'm experiencing the problem with each of the tables so the problem is not
specific to a table. I can enter records in Access without a problem, but as
there are some pretty complex relationships between the tables which are
hard to relay to a secretary my goal was to mask that with a front-end of
some sort. Thus the C# application.

I created a project, one form and a database connection to access the
database. The only error I have when moving the database into the project is
one about the relationship (can't read them or something to that effect). I
look at the database & tables and they've been added to the project.

Binding a table, for example the Ledger table I mentioned works fine (it
appears). I'm able to preview the (single) record in the database, so the
binding works; however when I run the program and call the form the database
navigation is greyed, no records are shown.

As the problem involves stock code with stock controls and nothing really
custom I thought I was providing as much of what I could. Sounds like not.

Short of zipping up the entire project and posting it somewhere (which I
don't have) it sounds like I'm stuck.

Needless to say, I'm a bit disappointed as I've used VB for years in this
type of situaiton and it's only been since moving to VS2008 that I've
experiences this amount of frustration. I was actually able to access my SQL
database with prior versions of VS.

"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote in
message news:1C**********************************@microsof t.com...
Your code does not compile. Did you review this link? I'm calling in Jon
to yell at you.
Review the instructions here.
http://www.yoda.arachsys.com/csharp/complete.html

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:e8**************@TK2MSFTNGP06.phx.gbl...
>Thanks.
===frmMain.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}

private void miFileClose_Click(object sender, EventArgs e)
{
Close();
}

private void miFormsRegister_Click(object sender, EventArgs e)
{
// frmRegister Registration = new frmRegister();
frmRegistration Registration = new frmRegistration();
Registration.MdiParent = this;
Registration.Show();

}

private void miFormsClubs_Click(object sender, EventArgs e)
{
frmClubs Clubs = new frmClubs();
Clubs.MdiParent = this;
Clubs.Show();
}

private void miFormsLedger_Click(object sender, EventArgs e)
{
frmLedger Ledger = new frmLedger(); ;
Ledger.MdiParent = this;
Ledger.Show();
}
}
}

====frmLedger.cs

sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmLedger : Form
{
public frmLedger()
{
InitializeComponent();
}

private void frmLedger_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the
'awanaDataSet.Ledger' table. You can move, or remove it, as needed.
this.LedgerTA.Fill(this.awanaDataSet.Ledger);

}
}
}

===>frmLedger.Designer.cs
namespace ACRMS
{
partial class frmLedger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle1 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle2 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle3 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle4 = new
System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(ty peof(frmLedger));
this.statLedger = new System.Windows.Forms.StatusStrip();
this.dgvLedger = new System.Windows.Forms.DataGridView();
this.awanaDataSet = new ACRMS.AwanaDataSet();
this.LedgerBS = new
System.Windows.Forms.BindingSource(this.component s);
this.LedgerTA = new
ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapte r();
this.iDDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.aDateDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.descriptionDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.debitDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.creditDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.Balance = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.commentsDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );

((System.ComponentModel.ISupportInitialize)(this. dgvLedger)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this. awanaDataSet)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this. LedgerBS)).BeginInit();
this.SuspendLayout();
//
// statLedger
//
this.statLedger.Location = new System.Drawing.Point(0, 177);
this.statLedger.Name = "statLedger";
this.statLedger.Size = new System.Drawing.Size(488, 22);
this.statLedger.TabIndex = 0;
this.statLedger.Text = "statusStrip1";
//
// dgvLedger
//
this.dgvLedger.AutoGenerateColumns = false;
this.dgvLedger.ColumnHeadersHeightSizeMode =
System.Windows.Forms.DataGridViewColumnHeadersHei ghtSizeMode.AutoSize;
this.dgvLedger.Columns.AddRange(new
System.Windows.Forms.DataGridViewColumn[] {
this.iDDataGridViewTextBoxColumn,
this.aDateDataGridViewTextBoxColumn,
this.descriptionDataGridViewTextBoxColumn,
this.debitDataGridViewTextBoxColumn,
this.creditDataGridViewTextBoxColumn,
this.Balance,
this.commentsDataGridViewTextBoxColumn});
this.dgvLedger.DataSource = this.LedgerBS;
this.dgvLedger.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvLedger.Location = new System.Drawing.Point(0, 0);
this.dgvLedger.Name = "dgvLedger";
this.dgvLedger.Size = new System.Drawing.Size(488, 177);
this.dgvLedger.TabIndex = 1;
//
// awanaDataSet
//
this.awanaDataSet.DataSetName = "AwanaDataSet";
this.awanaDataSet.SchemaSerializationMode =
System.Data.SchemaSerializationMode.IncludeSchema ;
//
// LedgerBS
//
this.LedgerBS.DataMember = "Ledger";
this.LedgerBS.DataSource = this.awanaDataSet;
//
// LedgerTA
//
this.LedgerTA.ClearBeforeFill = true;
//
// iDDataGridViewTextBoxColumn
//
this.iDDataGridViewTextBoxColumn.DataPropertyName = "ID";
this.iDDataGridViewTextBoxColumn.HeaderText = "ID";
this.iDDataGridViewTextBoxColumn.Name =
"iDDataGridViewTextBoxColumn";
this.iDDataGridViewTextBoxColumn.Visible = false;
//
// aDateDataGridViewTextBoxColumn
//
this.aDateDataGridViewTextBoxColumn.DataPropertyNa me =
"ADate";
dataGridViewCellStyle1.Format = "d";
dataGridViewCellStyle1.NullValue = null;
this.aDateDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle1;
this.aDateDataGridViewTextBoxColumn.HeaderText = "Date";
this.aDateDataGridViewTextBoxColumn.Name =
"aDateDataGridViewTextBoxColumn";
this.aDateDataGridViewTextBoxColumn.Width = 75;
//
// descriptionDataGridViewTextBoxColumn
//
this.descriptionDataGridViewTextBoxColumn.DataProp ertyName =
"Description";
this.descriptionDataGridViewTextBoxColumn.HeaderTe xt =
"Description";
this.descriptionDataGridViewTextBoxColumn.Name =
"descriptionDataGridViewTextBoxColumn";
this.descriptionDataGridViewTextBoxColumn.Width = 150;
//
// debitDataGridViewTextBoxColumn
//
this.debitDataGridViewTextBoxColumn.DataPropertyNa me =
"Debit";
dataGridViewCellStyle2.Alignment =
System.Windows.Forms.DataGridViewContentAlignment .MiddleRight;
dataGridViewCellStyle2.Format = "N2";
dataGridViewCellStyle2.NullValue = "0";
this.debitDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle2;
this.debitDataGridViewTextBoxColumn.HeaderText = "Debit";
this.debitDataGridViewTextBoxColumn.Name =
"debitDataGridViewTextBoxColumn";
this.debitDataGridViewTextBoxColumn.Resizable =
System.Windows.Forms.DataGridViewTriState.False ;
this.debitDataGridViewTextBoxColumn.Width = 60;
//
// creditDataGridViewTextBoxColumn
//
this.creditDataGridViewTextBoxColumn.DataPropertyN ame =
"Credit";
dataGridViewCellStyle3.Alignment =
System.Windows.Forms.DataGridViewContentAlignment .MiddleRight;
dataGridViewCellStyle3.Format = "N2";
dataGridViewCellStyle3.NullValue = "0";
this.creditDataGridViewTextBoxColumn.DefaultCellSt yle =
dataGridViewCellStyle3;
this.creditDataGridViewTextBoxColumn.HeaderText = "Credit";
this.creditDataGridViewTextBoxColumn.Name =
"creditDataGridViewTextBoxColumn";
this.creditDataGridViewTextBoxColumn.Width = 60;
//
// Balance
//
dataGridViewCellStyle4.Alignment =
System.Windows.Forms.DataGridViewContentAlignment .MiddleRight;
dataGridViewCellStyle4.Format = "N2";
dataGridViewCellStyle4.NullValue = "0";
this.Balance.DefaultCellStyle = dataGridViewCellStyle4;
this.Balance.HeaderText = "Balance";
this.Balance.Name = "Balance";
//
// commentsDataGridViewTextBoxColumn
//
this.commentsDataGridViewTextBoxColumn.DataPropert yName =
"Comments";
this.commentsDataGridViewTextBoxColumn.HeaderText =
"Comments";
this.commentsDataGridViewTextBoxColumn.Name =
"commentsDataGridViewTextBoxColumn";
this.commentsDataGridViewTextBoxColumn.Visible = false;
this.commentsDataGridViewTextBoxColumn.Width = 250;
//
// frmLedger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(488, 199);
this.Controls.Add(this.dgvLedger);
this.Controls.Add(this.statLedger);
this.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialo g;
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$this .Icon")));
this.MaximizeBox = false;
this.Name = "frmLedger";
this.Text = "Ledger";
this.Load += new System.EventHandler(this.frmLedger_Load);

((System.ComponentModel.ISupportInitialize)(this. dgvLedger)).EndInit();

((System.ComponentModel.ISupportInitialize)(this. awanaDataSet)).EndInit();

((System.ComponentModel.ISupportInitialize)(this. LedgerBS)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.StatusStrip statLedger;
private System.Windows.Forms.DataGridView dgvLedger;
private AwanaDataSet awanaDataSet;
private System.Windows.Forms.BindingSource LedgerBS;
private ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter
LedgerTA;
private System.Windows.Forms.DataGridViewTextBoxColumn
iDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
aDateDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
descriptionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
debitDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
creditDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn Balance;
private System.Windows.Forms.DataGridViewTextBoxColumn
commentsDataGridViewTextBoxColumn;
}
}

I've had this minimal code load the table in prior versions of both VB as
well as C#. At this stage I've done no more than insure the table is
correctly loaded before proceeding further. One record exists in this
table
and it is not loaded. The bindingNav is actually greyed out and record
count
is 0.

This is the data in the table to be loaded.

"ID","ADate","Description","Debit","Credit","Comm ents"
1,10/3/2008 0:00:00,"Dues",$67.00,$0.00,
"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote
in
message news:26**********************************@microsof t.com...
>>Post your code with sample data.

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...
I hate to cross post, but I've gotten no answer yet on a problem I'm
having with visual studio 2008.

I've created a series of forms with controls to access a Access
database
tables. The connection string works fine and the tables are added to
the
project without a problem.

When I create the tables they appear to bind and I am able to preview
the
data in the database in design mode; however, at runtime no data is
displayed and the dataviewgrids don't allow me to update the tables.

I'm currently using C#, but have tried the same application in Visual
Basic with the same results.

I've also tried re-creating the application (at least one of the
windows
forms) on a different computer with the same results. Not able to
display
the access tables.. As well as with SSCE as the data source.

I've checked MSDN and stepped through the Walkthroughs with no success.

Has anyone else seen this problem or provide me some guidance.
Oct 13 '08 #5

P: n/a
When the tables were created, did you create a primary key for each?

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
__________________________________________________ __________________________________________

"Wesley Peace" <We*********@hotmail.comwrote in message
news:OK**************@TK2MSFTNGP04.phx.gbl...
:'-]

I would love to be able to provide all aspects of the program, but trying
to do so would me I'm uploading quite a bit of code (which by the way I
tried).

So let me see if I can explain what I'm doing rather than upload what is
unloadable.

I've got an Access 2007 database created with some pretty generic tables
(replicating a database I created in SQL two years ago that got lost).

I'm experiencing the problem with each of the tables so the problem is not
specific to a table. I can enter records in Access without a problem, but
as there are some pretty complex relationships between the tables which
are hard to relay to a secretary my goal was to mask that with a front-end
of some sort. Thus the C# application.

I created a project, one form and a database connection to access the
database. The only error I have when moving the database into the project
is one about the relationship (can't read them or something to that
effect). I look at the database & tables and they've been added to the
project.

Binding a table, for example the Ledger table I mentioned works fine (it
appears). I'm able to preview the (single) record in the database, so the
binding works; however when I run the program and call the form the
database navigation is greyed, no records are shown.

As the problem involves stock code with stock controls and nothing really
custom I thought I was providing as much of what I could. Sounds like not.

Short of zipping up the entire project and posting it somewhere (which I
don't have) it sounds like I'm stuck.

Needless to say, I'm a bit disappointed as I've used VB for years in this
type of situaiton and it's only been since moving to VS2008 that I've
experiences this amount of frustration. I was actually able to access my
SQL database with prior versions of VS.

"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote in
message news:1C**********************************@microsof t.com...
>Your code does not compile. Did you review this link? I'm calling in Jon
to yell at you.
Review the instructions here.
http://www.yoda.arachsys.com/csharp/complete.html

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:e8**************@TK2MSFTNGP06.phx.gbl...
>>Thanks.
===frmMain.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}

private void miFileClose_Click(object sender, EventArgs e)
{
Close();
}

private void miFormsRegister_Click(object sender, EventArgs e)
{
// frmRegister Registration = new frmRegister();
frmRegistration Registration = new frmRegistration();
Registration.MdiParent = this;
Registration.Show();

}

private void miFormsClubs_Click(object sender, EventArgs e)
{
frmClubs Clubs = new frmClubs();
Clubs.MdiParent = this;
Clubs.Show();
}

private void miFormsLedger_Click(object sender, EventArgs e)
{
frmLedger Ledger = new frmLedger(); ;
Ledger.MdiParent = this;
Ledger.Show();
}
}
}

====frmLedger.cs

sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmLedger : Form
{
public frmLedger()
{
InitializeComponent();
}

private void frmLedger_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the
'awanaDataSet.Ledger' table. You can move, or remove it, as needed.
this.LedgerTA.Fill(this.awanaDataSet.Ledger);

}
}
}

===>frmLedger.Designer.cs
namespace ACRMS
{
partial class frmLedger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle1 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle2 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle3 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle4 = new
System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources =
new
System.ComponentModel.ComponentResourceManager(t ypeof(frmLedger));
this.statLedger = new System.Windows.Forms.StatusStrip();
this.dgvLedger = new System.Windows.Forms.DataGridView();
this.awanaDataSet = new ACRMS.AwanaDataSet();
this.LedgerBS = new
System.Windows.Forms.BindingSource(this.componen ts);
this.LedgerTA = new
ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapt er();
this.iDDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn() ;
this.aDateDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn() ;
this.descriptionDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn() ;
this.debitDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn() ;
this.creditDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn() ;
this.Balance = new
System.Windows.Forms.DataGridViewTextBoxColumn() ;
this.commentsDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn() ;

((System.ComponentModel.ISupportInitialize)(this .dgvLedger)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this .awanaDataSet)).BeginInit();

((System.ComponentModel.ISupportInitialize)(this .LedgerBS)).BeginInit();
this.SuspendLayout();
//
// statLedger
//
this.statLedger.Location = new System.Drawing.Point(0, 177);
this.statLedger.Name = "statLedger";
this.statLedger.Size = new System.Drawing.Size(488, 22);
this.statLedger.TabIndex = 0;
this.statLedger.Text = "statusStrip1";
//
// dgvLedger
//
this.dgvLedger.AutoGenerateColumns = false;
this.dgvLedger.ColumnHeadersHeightSizeMode =
System.Windows.Forms.DataGridViewColumnHeadersHe ightSizeMode.AutoSize;
this.dgvLedger.Columns.AddRange(new
System.Windows.Forms.DataGridViewColumn[] {
this.iDDataGridViewTextBoxColumn,
this.aDateDataGridViewTextBoxColumn,
this.descriptionDataGridViewTextBoxColumn,
this.debitDataGridViewTextBoxColumn,
this.creditDataGridViewTextBoxColumn,
this.Balance,
this.commentsDataGridViewTextBoxColumn});
this.dgvLedger.DataSource = this.LedgerBS;
this.dgvLedger.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvLedger.Location = new System.Drawing.Point(0, 0);
this.dgvLedger.Name = "dgvLedger";
this.dgvLedger.Size = new System.Drawing.Size(488, 177);
this.dgvLedger.TabIndex = 1;
//
// awanaDataSet
//
this.awanaDataSet.DataSetName = "AwanaDataSet";
this.awanaDataSet.SchemaSerializationMode =
System.Data.SchemaSerializationMode.IncludeSchem a;
//
// LedgerBS
//
this.LedgerBS.DataMember = "Ledger";
this.LedgerBS.DataSource = this.awanaDataSet;
//
// LedgerTA
//
this.LedgerTA.ClearBeforeFill = true;
//
// iDDataGridViewTextBoxColumn
//
this.iDDataGridViewTextBoxColumn.DataPropertyName = "ID";
this.iDDataGridViewTextBoxColumn.HeaderText = "ID";
this.iDDataGridViewTextBoxColumn.Name =
"iDDataGridViewTextBoxColumn";
this.iDDataGridViewTextBoxColumn.Visible = false;
//
// aDateDataGridViewTextBoxColumn
//
this.aDateDataGridViewTextBoxColumn.DataPropertyNa me =
"ADate";
dataGridViewCellStyle1.Format = "d";
dataGridViewCellStyle1.NullValue = null;
this.aDateDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle1;
this.aDateDataGridViewTextBoxColumn.HeaderText = "Date";
this.aDateDataGridViewTextBoxColumn.Name =
"aDateDataGridViewTextBoxColumn";
this.aDateDataGridViewTextBoxColumn.Width = 75;
//
// descriptionDataGridViewTextBoxColumn
//
this.descriptionDataGridViewTextBoxColumn.DataProp ertyName =
"Description";
this.descriptionDataGridViewTextBoxColumn.HeaderTe xt =
"Description";
this.descriptionDataGridViewTextBoxColumn.Name =
"descriptionDataGridViewTextBoxColumn";
this.descriptionDataGridViewTextBoxColumn.Width = 150;
//
// debitDataGridViewTextBoxColumn
//
this.debitDataGridViewTextBoxColumn.DataPropertyNa me =
"Debit";
dataGridViewCellStyle2.Alignment =
System.Windows.Forms.DataGridViewContentAlignmen t.MiddleRight;
dataGridViewCellStyle2.Format = "N2";
dataGridViewCellStyle2.NullValue = "0";
this.debitDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle2;
this.debitDataGridViewTextBoxColumn.HeaderText = "Debit";
this.debitDataGridViewTextBoxColumn.Name =
"debitDataGridViewTextBoxColumn";
this.debitDataGridViewTextBoxColumn.Resizable =
System.Windows.Forms.DataGridViewTriState.Fals e;
this.debitDataGridViewTextBoxColumn.Width = 60;
//
// creditDataGridViewTextBoxColumn
//
this.creditDataGridViewTextBoxColumn.DataPropertyN ame =
"Credit";
dataGridViewCellStyle3.Alignment =
System.Windows.Forms.DataGridViewContentAlignmen t.MiddleRight;
dataGridViewCellStyle3.Format = "N2";
dataGridViewCellStyle3.NullValue = "0";
this.creditDataGridViewTextBoxColumn.DefaultCellSt yle =
dataGridViewCellStyle3;
this.creditDataGridViewTextBoxColumn.HeaderText = "Credit";
this.creditDataGridViewTextBoxColumn.Name =
"creditDataGridViewTextBoxColumn";
this.creditDataGridViewTextBoxColumn.Width = 60;
//
// Balance
//
dataGridViewCellStyle4.Alignment =
System.Windows.Forms.DataGridViewContentAlignmen t.MiddleRight;
dataGridViewCellStyle4.Format = "N2";
dataGridViewCellStyle4.NullValue = "0";
this.Balance.DefaultCellStyle = dataGridViewCellStyle4;
this.Balance.HeaderText = "Balance";
this.Balance.Name = "Balance";
//
// commentsDataGridViewTextBoxColumn
//
this.commentsDataGridViewTextBoxColumn.DataPropert yName =
"Comments";
this.commentsDataGridViewTextBoxColumn.HeaderText =
"Comments";
this.commentsDataGridViewTextBoxColumn.Name =
"commentsDataGridViewTextBoxColumn";
this.commentsDataGridViewTextBoxColumn.Visible = false;
this.commentsDataGridViewTextBoxColumn.Width = 250;
//
// frmLedger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(488, 199);
this.Controls.Add(this.dgvLedger);
this.Controls.Add(this.statLedger);
this.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialog ;
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$thi s.Icon")));
this.MaximizeBox = false;
this.Name = "frmLedger";
this.Text = "Ledger";
this.Load += new System.EventHandler(this.frmLedger_Load);

((System.ComponentModel.ISupportInitialize)(this .dgvLedger)).EndInit();

((System.ComponentModel.ISupportInitialize)(this .awanaDataSet)).EndInit();

((System.ComponentModel.ISupportInitialize)(this .LedgerBS)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.StatusStrip statLedger;
private System.Windows.Forms.DataGridView dgvLedger;
private AwanaDataSet awanaDataSet;
private System.Windows.Forms.BindingSource LedgerBS;
private ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter
LedgerTA;
private System.Windows.Forms.DataGridViewTextBoxColumn
iDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
aDateDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
descriptionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
debitDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
creditDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn Balance;
private System.Windows.Forms.DataGridViewTextBoxColumn
commentsDataGridViewTextBoxColumn;
}
}

I've had this minimal code load the table in prior versions of both VB
as
well as C#. At this stage I've done no more than insure the table is
correctly loaded before proceeding further. One record exists in this
table
and it is not loaded. The bindingNav is actually greyed out and record
count
is 0.

This is the data in the table to be loaded.

"ID","ADate","Description","Debit","Credit","Com ments"
1,10/3/2008 0:00:00,"Dues",$67.00,$0.00,
"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote
in
message news:26**********************************@microsof t.com...
Post your code with sample data.

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl...
I hate to cross post, but I've gotten no answer yet on a problem I'm
having with visual studio 2008.
>
I've created a series of forms with controls to access a Access
database
tables. The connection string works fine and the tables are added to
the
project without a problem.
>
When I create the tables they appear to bind and I am able to preview
the
data in the database in design mode; however, at runtime no data is
displayed and the dataviewgrids don't allow me to update the tables.
>
I'm currently using C#, but have tried the same application in Visual
Basic with the same results.
>
I've also tried re-creating the application (at least one of the
windows
forms) on a different computer with the same results. Not able to
display
the access tables.. As well as with SSCE as the data source.
>
I've checked MSDN and stepped through the Walkthroughs with no
success.
>
Has anyone else seen this problem or provide me some guidance.

Oct 13 '08 #6

P: n/a
Yes

"William Vaughn (MVP)" <bi****@NoSpamBetav.comwrote in message
news:90**********************************@microsof t.com...
When the tables were created, did you create a primary key for each?

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
__________________________________________________ __________________________________________

"Wesley Peace" <We*********@hotmail.comwrote in message
news:OK**************@TK2MSFTNGP04.phx.gbl...
>:'-]

I would love to be able to provide all aspects of the program, but
trying to do so would me I'm uploading quite a bit of code (which by the
way I tried).

So let me see if I can explain what I'm doing rather than upload what is
unloadable.

I've got an Access 2007 database created with some pretty generic tables
(replicating a database I created in SQL two years ago that got lost).

I'm experiencing the problem with each of the tables so the problem is
not specific to a table. I can enter records in Access without a problem,
but as there are some pretty complex relationships between the tables
which are hard to relay to a secretary my goal was to mask that with a
front-end of some sort. Thus the C# application.

I created a project, one form and a database connection to access the
database. The only error I have when moving the database into the project
is one about the relationship (can't read them or something to that
effect). I look at the database & tables and they've been added to the
project.

Binding a table, for example the Ledger table I mentioned works fine (it
appears). I'm able to preview the (single) record in the database, so the
binding works; however when I run the program and call the form the
database navigation is greyed, no records are shown.

As the problem involves stock code with stock controls and nothing really
custom I thought I was providing as much of what I could. Sounds like
not.

Short of zipping up the entire project and posting it somewhere (which I
don't have) it sounds like I'm stuck.

Needless to say, I'm a bit disappointed as I've used VB for years in this
type of situaiton and it's only been since moving to VS2008 that I've
experiences this amount of frustration. I was actually able to access my
SQL database with prior versions of VS.

"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote
in message news:1C**********************************@microsof t.com...
>>Your code does not compile. Did you review this link? I'm calling in Jon
to yell at you.
Review the instructions here.
http://www.yoda.arachsys.com/csharp/complete.html

--
Regards,
Alvin Bruney

Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc

"Wesley Peace" <We*********@hotmail.comwrote in message
news:e8**************@TK2MSFTNGP06.phx.gbl...
Thanks.
===frmMain.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmMain : Form
{
public frmMain()
{
InitializeComponent();
}

private void miFileClose_Click(object sender, EventArgs e)
{
Close();
}

private void miFormsRegister_Click(object sender, EventArgs e)
{
// frmRegister Registration = new frmRegister();
frmRegistration Registration = new frmRegistration();
Registration.MdiParent = this;
Registration.Show();

}

private void miFormsClubs_Click(object sender, EventArgs e)
{
frmClubs Clubs = new frmClubs();
Clubs.MdiParent = this;
Clubs.Show();
}

private void miFormsLedger_Click(object sender, EventArgs e)
{
frmLedger Ledger = new frmLedger(); ;
Ledger.MdiParent = this;
Ledger.Show();
}
}
}

====frmLedger.cs

sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ACRMS
{
public partial class frmLedger : Form
{
public frmLedger()
{
InitializeComponent();
}

private void frmLedger_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the
'awanaDataSet.Ledger' table. You can move, or remove it, as needed.
this.LedgerTA.Fill(this.awanaDataSet.Ledger);

}
}
}

===>frmLedger.Designer.cs
namespace ACRMS
{
partial class frmLedger
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows Form Designer generated code

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle1 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle2 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle3 = new
System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle
dataGridViewCellStyle4 = new
System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources =
new
System.ComponentModel.ComponentResourceManager( typeof(frmLedger));
this.statLedger = new System.Windows.Forms.StatusStrip();
this.dgvLedger = new System.Windows.Forms.DataGridView();
this.awanaDataSet = new ACRMS.AwanaDataSet();
this.LedgerBS = new
System.Windows.Forms.BindingSource(this.compone nts);
this.LedgerTA = new
ACRMS.AwanaDataSetTableAdapters.LedgerTableAdap ter();
this.iDDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.aDateDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.descriptionDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.debitDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.creditDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.Balance = new
System.Windows.Forms.DataGridViewTextBoxColumn( );
this.commentsDataGridViewTextBoxColumn = new
System.Windows.Forms.DataGridViewTextBoxColumn( );

((System.ComponentModel.ISupportInitialize)(thi s.dgvLedger)).BeginInit();

((System.ComponentModel.ISupportInitialize)(thi s.awanaDataSet)).BeginInit();

((System.ComponentModel.ISupportInitialize)(thi s.LedgerBS)).BeginInit();
this.SuspendLayout();
//
// statLedger
//
this.statLedger.Location = new System.Drawing.Point(0, 177);
this.statLedger.Name = "statLedger";
this.statLedger.Size = new System.Drawing.Size(488, 22);
this.statLedger.TabIndex = 0;
this.statLedger.Text = "statusStrip1";
//
// dgvLedger
//
this.dgvLedger.AutoGenerateColumns = false;
this.dgvLedger.ColumnHeadersHeightSizeMode =
System.Windows.Forms.DataGridViewColumnHeadersH eightSizeMode.AutoSize;
this.dgvLedger.Columns.AddRange(new
System.Windows.Forms.DataGridViewColumn[] {
this.iDDataGridViewTextBoxColumn,
this.aDateDataGridViewTextBoxColumn,
this.descriptionDataGridViewTextBoxColumn,
this.debitDataGridViewTextBoxColumn,
this.creditDataGridViewTextBoxColumn,
this.Balance,
this.commentsDataGridViewTextBoxColumn});
this.dgvLedger.DataSource = this.LedgerBS;
this.dgvLedger.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvLedger.Location = new System.Drawing.Point(0, 0);
this.dgvLedger.Name = "dgvLedger";
this.dgvLedger.Size = new System.Drawing.Size(488, 177);
this.dgvLedger.TabIndex = 1;
//
// awanaDataSet
//
this.awanaDataSet.DataSetName = "AwanaDataSet";
this.awanaDataSet.SchemaSerializationMode =
System.Data.SchemaSerializationMode.IncludeSche ma;
//
// LedgerBS
//
this.LedgerBS.DataMember = "Ledger";
this.LedgerBS.DataSource = this.awanaDataSet;
//
// LedgerTA
//
this.LedgerTA.ClearBeforeFill = true;
//
// iDDataGridViewTextBoxColumn
//
this.iDDataGridViewTextBoxColumn.DataPropertyName = "ID";
this.iDDataGridViewTextBoxColumn.HeaderText = "ID";
this.iDDataGridViewTextBoxColumn.Name =
"iDDataGridViewTextBoxColumn";
this.iDDataGridViewTextBoxColumn.Visible = false;
//
// aDateDataGridViewTextBoxColumn
//
this.aDateDataGridViewTextBoxColumn.DataPropertyNa me =
"ADate";
dataGridViewCellStyle1.Format = "d";
dataGridViewCellStyle1.NullValue = null;
this.aDateDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle1;
this.aDateDataGridViewTextBoxColumn.HeaderText = "Date";
this.aDateDataGridViewTextBoxColumn.Name =
"aDateDataGridViewTextBoxColumn";
this.aDateDataGridViewTextBoxColumn.Width = 75;
//
// descriptionDataGridViewTextBoxColumn
//
this.descriptionDataGridViewTextBoxColumn.DataProp ertyName =
"Description";
this.descriptionDataGridViewTextBoxColumn.HeaderTe xt =
"Description";
this.descriptionDataGridViewTextBoxColumn.Name =
"descriptionDataGridViewTextBoxColumn";
this.descriptionDataGridViewTextBoxColumn.Width = 150;
//
// debitDataGridViewTextBoxColumn
//
this.debitDataGridViewTextBoxColumn.DataPropertyNa me =
"Debit";
dataGridViewCellStyle2.Alignment =
System.Windows.Forms.DataGridViewContentAlignme nt.MiddleRight;
dataGridViewCellStyle2.Format = "N2";
dataGridViewCellStyle2.NullValue = "0";
this.debitDataGridViewTextBoxColumn.DefaultCellSty le =
dataGridViewCellStyle2;
this.debitDataGridViewTextBoxColumn.HeaderText = "Debit";
this.debitDataGridViewTextBoxColumn.Name =
"debitDataGridViewTextBoxColumn";
this.debitDataGridViewTextBoxColumn.Resizable =
System.Windows.Forms.DataGridViewTriState.False ;
this.debitDataGridViewTextBoxColumn.Width = 60;
//
// creditDataGridViewTextBoxColumn
//
this.creditDataGridViewTextBoxColumn.DataPropertyN ame =
"Credit";
dataGridViewCellStyle3.Alignment =
System.Windows.Forms.DataGridViewContentAlignme nt.MiddleRight;
dataGridViewCellStyle3.Format = "N2";
dataGridViewCellStyle3.NullValue = "0";
this.creditDataGridViewTextBoxColumn.DefaultCellSt yle =
dataGridViewCellStyle3;
this.creditDataGridViewTextBoxColumn.HeaderText = "Credit";
this.creditDataGridViewTextBoxColumn.Name =
"creditDataGridViewTextBoxColumn";
this.creditDataGridViewTextBoxColumn.Width = 60;
//
// Balance
//
dataGridViewCellStyle4.Alignment =
System.Windows.Forms.DataGridViewContentAlignme nt.MiddleRight;
dataGridViewCellStyle4.Format = "N2";
dataGridViewCellStyle4.NullValue = "0";
this.Balance.DefaultCellStyle = dataGridViewCellStyle4;
this.Balance.HeaderText = "Balance";
this.Balance.Name = "Balance";
//
// commentsDataGridViewTextBoxColumn
//
this.commentsDataGridViewTextBoxColumn.DataPropert yName =
"Comments";
this.commentsDataGridViewTextBoxColumn.HeaderText =
"Comments";
this.commentsDataGridViewTextBoxColumn.Name =
"commentsDataGridViewTextBoxColumn";
this.commentsDataGridViewTextBoxColumn.Visible = false;
this.commentsDataGridViewTextBoxColumn.Width = 250;
//
// frmLedger
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F,
13F);
this.AutoScaleMode =
System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(488, 199);
this.Controls.Add(this.dgvLedger);
this.Controls.Add(this.statLedger);
this.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedDialo g;
this.Icon =
((System.Drawing.Icon)(resources.GetObject("$th is.Icon")));
this.MaximizeBox = false;
this.Name = "frmLedger";
this.Text = "Ledger";
this.Load += new System.EventHandler(this.frmLedger_Load);

((System.ComponentModel.ISupportInitialize)(thi s.dgvLedger)).EndInit();

((System.ComponentModel.ISupportInitialize)(thi s.awanaDataSet)).EndInit();

((System.ComponentModel.ISupportInitialize)(thi s.LedgerBS)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

}

#endregion

private System.Windows.Forms.StatusStrip statLedger;
private System.Windows.Forms.DataGridView dgvLedger;
private AwanaDataSet awanaDataSet;
private System.Windows.Forms.BindingSource LedgerBS;
private ACRMS.AwanaDataSetTableAdapters.LedgerTableAdapter
LedgerTA;
private System.Windows.Forms.DataGridViewTextBoxColumn
iDDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
aDateDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
descriptionDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
debitDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn
creditDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn Balance;
private System.Windows.Forms.DataGridViewTextBoxColumn
commentsDataGridViewTextBoxColumn;
}
}

I've had this minimal code load the table in prior versions of both VB
as
well as C#. At this stage I've done no more than insure the table is
correctly loaded before proceeding further. One record exists in this
table
and it is not loaded. The bindingNav is actually greyed out and record
count
is 0.

This is the data in the table to be loaded.

"ID","ADate","Description","Debit","Credit","Co mments"
1,10/3/2008 0:00:00,"Dues",$67.00,$0.00,
"Alvin Bruney [ASP.NET MVP]" <vapor dan a t h u t ma le dut cu mwrote
in
message news:26**********************************@microsof t.com...
Post your code with sample data.
>
--
Regards,
Alvin Bruney
>
Want a free copy of VS 2008 w/ MSDN premium subscription?
Details at http://msmvps.com/blogs/alvin/Default.aspx
>
Auther Plug
OWC Blackbook now on download at www.lulu.com/owc
>
"Wesley Peace" <We*********@hotmail.comwrote in message
news:Oq**************@TK2MSFTNGP05.phx.gbl.. .
>I hate to cross post, but I've gotten no answer yet on a problem I'm
>having with visual studio 2008.
>>
>I've created a series of forms with controls to access a Access
>database
>tables. The connection string works fine and the tables are added to
>the
>project without a problem.
>>
>When I create the tables they appear to bind and I am able to preview
>the
>data in the database in design mode; however, at runtime no data is
>displayed and the dataviewgrids don't allow me to update the tables.
>>
>I'm currently using C#, but have tried the same application in Visual
>Basic with the same results.
>>
>I've also tried re-creating the application (at least one of the
>windows
>forms) on a different computer with the same results. Not able to
>display
>the access tables.. As well as with SSCE as the data source.
>>
>I've checked MSDN and stepped through the Walkthroughs with no
>success.
>>
>Has anyone else seen this problem or provide me some guidance.
>
Oct 13 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.