Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Fill a table in SQL Server Express Expand / Collapse
Author
Message
Posted Thursday, October 12, 2006 5:42 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, July 29, 2007 11:51 PM
Points: 4, Visits: 1
Hi,

I'm trying to fill data in an SQL server table, sofar I wrote the following in C#:
result contains the data I need to write in to the table Transaction_Header

private void buttonReportFillTable_Click(object sender, EventArgs e)
{
Tools.FillQueue(clientsock, result, Tags.C_TRANSDETAIL);
Touchpos_SQL_serverDataSet.Transaction_HeaderRow Row = new Touchpos_SQL_serverDataSet.Transaction_HeaderDataTable();

Here the C# compiler comes back with the following error message:
Error 1 Cannot implicitly convert type 'TouchEdit.Touchpos_SQL_serverDataSet.Transaction_HeaderDataTable' to 'TouchEdit.Touchpos_SQL_serverDataSet.Transaction_HeaderRow' C:\Touch application\deploy\Editor\report\report.cs 27 68 TouchEdit

What am I doing wrong?

best regards

Frank
Post #314912
Posted Friday, October 13, 2006 2:44 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, April 9, 2014 3:50 AM
Points: 255, Visits: 204

Hi,

You are going to get this error because you are attempting to instantiate an object that is different from the one that you declared.

You entered:

Touchpos_SQL_serverDataSet.Transaction_HeaderRow Row = new Touchpos_SQL_serverDataSet.Transaction_HeaderDataTable();

Perhaps you should have entered:

Touchpos_SQL_serverDataSet.Transaction_HeaderRow Row = new Touchpos_SQL_serverDataSet.Transaction_HeaderRow();

regards

Shaun

 

Post #315183
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse