Click here to Skip to main content
16,002,224 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Every one,

One of my vender send data to my server from different ports nearly 1000 records for every 30 secs. By lisener in C# Iam inserting the data into textfile and in sql server table by stored procedure (ADO.NET). The data gets inserted in txtfile completly but the data seems to missing in the table. and the service also seems to off periodically.

Any help please.

What I have tried:

Tried sync by creating tasks in C# side. But no use in sql server side

for testing i have just send same record multiple times from 5 clients but data is missing
Posted
Updated 28-Apr-18 1:08am
v2

1 solution

If the data isn't inserted to SQL Server correctly, you may basically have few problems
- the data is never tried to be inserted
- the insert fails with an error
- to insert is rolled back by a transaction

You didn't provide any information how the data is actually inserted into the SQL Server database, but take a look of all relevant log files, do you find any errors that would explain the situation. Also you can enhance the error handling in the procedure to get better information about exceptions.
 
Share this answer
 
Comments
Nagarjun558 4-May-18 5:59am    
for testing i have just send same record multiple times from 5 clients but some records are missing some are inserting.
Wendelius 4-May-18 13:01pm    
I'm afraid this brings no new information about the problem. As explained, the best approach is to gather more data about the possible errors, log information etc. This way you can track down the actual problem.

One tool I didn't mention is the SQL Profiler. You can utilize that to see what command are sent to the SQL server.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900