472,353 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

vstudio data access problems

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
6 2269
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
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
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
:'-]

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: mike | last post by:
What is the proper method for setting up visual studio 2003 to store and run solutions on a windoes 2003 webserver? Using vstudio enterprise on...
10
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break...
32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and...
6
by: Ishbel Kargar | last post by:
I've bought a new laptop (running Windows XP home edition) to replace my old one (running Windows 98). I don't have cable connection between the...
2
by: Riegn Man | last post by:
I have a problem with access and our time clocks. We have time clocks that put out a .log file with the badge swipes for everybody. There is one...
9
by: AnandaSim | last post by:
Hi All, I've had Access 97, 2000 connections to the corporate Oracle database for a few years now - but seldom use it. When I did use it years...
5
by: Patrick Olurotimi Ige | last post by:
Hi, I have VStudio.Net 2003 installed but can i install Visual Web Developer also on the same PC. My current .Net Frameork version is 1.1. Will...
34
by: Jeff | last post by:
For years I have been using VBA extensively for updating data to tables after processing. By this I mean if I had to do some intensive processing...
0
by: Gregg | last post by:
I'm working to upgrade an ASP web app with a Microsoft Access 2003 db to ASP.NET v2 with a SQL Express db. I don't have a lot of experience with...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.