mrlogik
February 24th, 2010, 12:35 PM
Hi guys,
I have about 15 years programming experience but I'm an SQL / data base beginner.
I am writing an application in VS 2008 .NET C#. The primary function of this application is to receive high frequency data on a namedpipe, and store the data into a Local Database.
To start, I have the named pipe event driven portion of my app working. I am now trying to add the database. These are the steps I have followed.
1. Add new item --> Local database. I then set a DataSet name in the wizard DBDataSet (which is empty for the newly created local database).
2. I go to the Server Explorer and Create a new table. In this table I set the first column to the primary key, which is how i intend to index the data base. I name this table dbALL and add the column header information for the data I wish to store.
3. Configure Data Source with the Data Wizard. I add dbALL. The connection is of type "Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5)." The "Test Connection" works fine.
At this point I believe I have my database setup in my project properly. Yes, no ?
Now, I would like to populate the database with incoming data from my named pipe. The rate I am receiving data is on the millisecond order. Each complete record needs to go into a row in the database. I see there are many methods for doing this, including using a TableAdapter, and probably more that I am oblivious to. With the TableAdapter I believe I need to add an Insert() Query to accomplish this.
What do you think the best method to accomplish this is?
Thank you.
Anthony
I have about 15 years programming experience but I'm an SQL / data base beginner.
I am writing an application in VS 2008 .NET C#. The primary function of this application is to receive high frequency data on a namedpipe, and store the data into a Local Database.
To start, I have the named pipe event driven portion of my app working. I am now trying to add the database. These are the steps I have followed.
1. Add new item --> Local database. I then set a DataSet name in the wizard DBDataSet (which is empty for the newly created local database).
2. I go to the Server Explorer and Create a new table. In this table I set the first column to the primary key, which is how i intend to index the data base. I name this table dbALL and add the column header information for the data I wish to store.
3. Configure Data Source with the Data Wizard. I add dbALL. The connection is of type "Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5)." The "Test Connection" works fine.
At this point I believe I have my database setup in my project properly. Yes, no ?
Now, I would like to populate the database with incoming data from my named pipe. The rate I am receiving data is on the millisecond order. Each complete record needs to go into a row in the database. I see there are many methods for doing this, including using a TableAdapter, and probably more that I am oblivious to. With the TableAdapter I believe I need to add an Insert() Query to accomplish this.
What do you think the best method to accomplish this is?
Thank you.
Anthony