Can I read a CSV file into System.Data.SqlClient.dll?

Anwind

Well-known member
Joined
Nov 6, 2021
Messages
48
Programming Experience
1-3
Hello

Can I read a CSV file into System.Data.SqlClient.dll?

An important purpose is to read a CSV file into System.Data.SqlClient.dll ?

No SQL DB required.
I don't even need the ability to write to the SQL DB.

Only,.... Only.... To read a CSV file into System.Data.SqlClient.dll ?

Is it possible?

I Used Visual Studio2019, C#.NET


MSSQL.png


MSSQL (1).png

My Code
C#:
// Read the CSV File into System.Data.SqlClient.dll

public System.Data.Common.DbDataReader ExecutDataReader(sQuery)
{
   Sysrem.Data.SqlClient.Command.ExecuteReader(Default);
}

String.Format("Row Number : {0}", rowNum);
String.Format("CSV File Column1 : {0}", Col1);

int rowNum = 1;
while (reader.Read())
{
rowNum++;
}
 
Last edited:
Your question is nonsensical. That DLL provides types for interacting with SQL Server databases. Are you asking ow to read a CSV file into a SQL Server database? If so then you can use SqlClient types to save the data but reading it from a CSV file is a separate operation.
 
You cannot read a CSV file directly using a SqlConnection. You need to import your data into a Microsoft SQL database, then connect to the database.
 
There's this great nuget package called Sylv..

Oh

C'mon now, it's about time you stopped posting scraps of ever changing nonsensical requirements and just tell us what the overall aim of this CSV project is.

No code, no thinking or designing, just tell us what data is coming in, what it looks like and where it has to go in the end, and what it needs to look like in the end
 
Back
Top Bottom