ALWilliams
Programmer
Ive some code which reads a CSV file and line by line inserts it into an SQL server.
However, the file has ~ 12,000 entries yet when the code gets to ~ 3933 it raises the following error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Why would this happen??
High-Level Psudo Code
Start of CSV Loop
Read line of data from csv
Insert into table (a,b,c,d) values (1,2,3,4) from csv
execute NonQuery
End Of CSV Loop
everything is closed/set to nothing/disposed.
I get this upon connection.open...
However, the file has ~ 12,000 entries yet when the code gets to ~ 3933 it raises the following error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Why would this happen??
High-Level Psudo Code
Start of CSV Loop
Read line of data from csv
Insert into table (a,b,c,d) values (1,2,3,4) from csv
execute NonQuery
End Of CSV Loop
everything is closed/set to nothing/disposed.
I get this upon connection.open...