Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: reading from CSV


    Thanks,
    I could not find any reference to Jet Provider (I'm unfamiliar with this) on
    the msft .net class library, can you explain how I can use this?

    Thanks,
    Vicky

    "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netRemuvThis> wrote in
    message news:%23plvVQjSDHA.560@TK2MSFTNGP10.phx.gbl...
    > For a driver, you have to go to the ODBC namespace (System.Data.ODBC). You
    > can, however, open a CSV with the Jet Provider if you wish to use OLEDB.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    > Author: ADO.NET and XML: ASP.NET on the Edge
    >
    >
    ************************************************** **************************
    > ****
    > Think Outside the Box!
    >
    ************************************************** **************************
    > ****
    > "Vicky S" <rainstorms@comcast.net> wrote in message
    > news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > > Hello,
    > > before dot net I could open up a sqlconnection to a txt/csv file with
    the
    > > connection string =
    > > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    > >
    > > how can I do that in dotnet?
    > >
    > > Thanks,
    > > V
    > >
    > >
    >
    >

    Vicky S Guest

  2. Similar Questions and Discussions

    1. reading .htm as .cfm
      Revisiting 1999 solution to pass embedded code in .htm pages thru the CF Server. I just posted this same query to the CFUG group. We were using...
    2. Reading from log
      Hello all, I am looking for help with creating a digest of a log file. I have found a nice tutorial that should help on...
    3. dir reading
      Can any one tell me why when i have the current dir have 6 jpg files and the index.php i use this code $cnt = 1; $dir = getcwd() ."/";...
    4. Reading in CDs
      I have made a director movie with some quicktime movies. All worked well on the computers then I try to transfer the files to a CD. However, when I...
    5. RDF reading in .NET
      How do you read RDF links (like news feeds) in .NET I was using XML reader but am getting invalid format now, since going to 1.1 of the...
  3. #2

    Default Re: reading from CSV

    Perhaps you'll be able to find the connection string you need here:
    [url]http://www.able-consulting.com/ADO_Conn.htm[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "Vicky S" <rainstorms@comcast.net> wrote in message
    news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > Hello,
    > before dot net I could open up a sqlconnection to a txt/csv file with the
    > connection string =
    > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    >
    > how can I do that in dotnet?
    >
    > Thanks,
    > V
    >
    >

    Steve C. Orr, MCSD Guest

  4. #3

    Default Re: reading from CSV


    Thanks....
    ok.... I'm halfway there...I think.
    I have the below code... but it won't let me connect. Is this wrong?

    Dim oOleDbConnection As OleDbConnection

    Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;"

    oOleDbConnection = New OleDb.OleDbConnection(sConnString)

    oOleDbConnection.Open()



    Dim oleCmd As OleDbCommand

    With oleCmd

    ..Connection = oOleDbConnection

    ..CommandType = CommandType.Text

    ..CommandText = "SELECT * FROM FieldMappings.csv"

    End With



    Dim oleAdapter As New OleDbDataAdapter()

    Dim dataset As DataSet

    oleAdapter.SelectCommand = New OleDbCommand(oleCmd.CommandText,
    oOleDbConnection)

    oleAdapter.Fill(DataSet)




    "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    news:OU12IjjSDHA.3144@tk2msftngp13.phx.gbl...
    > Perhaps you'll be able to find the connection string you need here:
    > [url]http://www.able-consulting.com/ADO_Conn.htm[/url]
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > [url]http://Steve.Orr.net[/url]
    >
    >
    > "Vicky S" <rainstorms@comcast.net> wrote in message
    > news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > > Hello,
    > > before dot net I could open up a sqlconnection to a txt/csv file with
    the
    > > connection string =
    > > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    > >
    > > how can I do that in dotnet?
    > >
    > > Thanks,
    > > V
    > >
    > >
    >
    >

    Vicky S Guest

  5. #4

    Default Re: reading from CSV

    You're halfway AWAY there. You were closer when you started. The Connection
    String would not change. You are still connecting to a comma-delimited text
    file, so you would certainly NOT use the Jet OLE DB driver, which is for
    Access databases. You would use the same Connection String you used before.
    You are connecting via an ODBC driver, so you would use the System.Data.Odbc
    Namespace, and the classes therein.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of little things.

    "Vicky S" <rainstorms@comcast.net> wrote in message
    news:e6LwQBkSDHA.3132@tk2msftngp13.phx.gbl...
    >
    > Thanks....
    > ok.... I'm halfway there...I think.
    > I have the below code... but it won't let me connect. Is this wrong?
    >
    > Dim oOleDbConnection As OleDbConnection
    >
    > Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;"
    >
    > oOleDbConnection = New OleDb.OleDbConnection(sConnString)
    >
    > oOleDbConnection.Open()
    >
    >
    >
    > Dim oleCmd As OleDbCommand
    >
    > With oleCmd
    >
    > .Connection = oOleDbConnection
    >
    > .CommandType = CommandType.Text
    >
    > .CommandText = "SELECT * FROM FieldMappings.csv"
    >
    > End With
    >
    >
    >
    > Dim oleAdapter As New OleDbDataAdapter()
    >
    > Dim dataset As DataSet
    >
    > oleAdapter.SelectCommand = New OleDbCommand(oleCmd.CommandText,
    > oOleDbConnection)
    >
    > oleAdapter.Fill(DataSet)
    >
    >
    >
    >
    > "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    > news:OU12IjjSDHA.3144@tk2msftngp13.phx.gbl...
    > > Perhaps you'll be able to find the connection string you need here:
    > > [url]http://www.able-consulting.com/ADO_Conn.htm[/url]
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > [url]http://Steve.Orr.net[/url]
    > >
    > >
    > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > > > Hello,
    > > > before dot net I could open up a sqlconnection to a txt/csv file with
    > the
    > > > connection string =
    > > > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    > > >
    > > > how can I do that in dotnet?
    > > >
    > > > Thanks,
    > > > V
    > > >
    > > >
    > >
    > >
    >
    >

    Kevin Spencer Guest

  6. #5

    Default Re: reading from CSV


    Hrm.. I'm using .net framework 1.0 and I don't think odbc is supported
    there.
    is there another way?


    "Kevin Spencer" <kevin@takempis.com> wrote in message
    news:eD3sJ3sSDHA.1748@TK2MSFTNGP11.phx.gbl...
    > You're halfway AWAY there. You were closer when you started. The
    Connection
    > String would not change. You are still connecting to a comma-delimited
    text
    > file, so you would certainly NOT use the Jet OLE DB driver, which is for
    > Access databases. You would use the same Connection String you used
    before.
    > You are connecting via an ODBC driver, so you would use the
    System.Data.Odbc
    > Namespace, and the classes therein.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > [url]http://www.takempis.com[/url]
    > Big things are made up of
    > lots of little things.
    >
    > "Vicky S" <rainstorms@comcast.net> wrote in message
    > news:e6LwQBkSDHA.3132@tk2msftngp13.phx.gbl...
    > >
    > > Thanks....
    > > ok.... I'm halfway there...I think.
    > > I have the below code... but it won't let me connect. Is this wrong?
    > >
    > > Dim oOleDbConnection As OleDbConnection
    > >
    > > Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;"
    > >
    > > oOleDbConnection = New OleDb.OleDbConnection(sConnString)
    > >
    > > oOleDbConnection.Open()
    > >
    > >
    > >
    > > Dim oleCmd As OleDbCommand
    > >
    > > With oleCmd
    > >
    > > .Connection = oOleDbConnection
    > >
    > > .CommandType = CommandType.Text
    > >
    > > .CommandText = "SELECT * FROM FieldMappings.csv"
    > >
    > > End With
    > >
    > >
    > >
    > > Dim oleAdapter As New OleDbDataAdapter()
    > >
    > > Dim dataset As DataSet
    > >
    > > oleAdapter.SelectCommand = New OleDbCommand(oleCmd.CommandText,
    > > oOleDbConnection)
    > >
    > > oleAdapter.Fill(DataSet)
    > >
    > >
    > >
    > >
    > > "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    > > news:OU12IjjSDHA.3144@tk2msftngp13.phx.gbl...
    > > > Perhaps you'll be able to find the connection string you need here:
    > > > [url]http://www.able-consulting.com/ADO_Conn.htm[/url]
    > > >
    > > > --
    > > > I hope this helps,
    > > > Steve C. Orr, MCSD
    > > > [url]http://Steve.Orr.net[/url]
    > > >
    > > >
    > > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > > news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > > > > Hello,
    > > > > before dot net I could open up a sqlconnection to a txt/csv file
    with
    > > the
    > > > > connection string =
    > > > > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    > > > >
    > > > > how can I do that in dotnet?
    > > > >
    > > > > Thanks,
    > > > > V
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Vicky S Guest

  7. #6

    Default Re: reading from CSV

    You can download the .NET Framework Data Provider for ODBC at
    [url]http://msdn.microsoft.com/downloads[/url].

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of little things.

    "Vicky S" <rainstorms@comcast.net> wrote in message
    news:OB$FdstSDHA.1036@TK2MSFTNGP10.phx.gbl...
    >
    > Hrm.. I'm using .net framework 1.0 and I don't think odbc is supported
    > there.
    > is there another way?
    >
    >
    > "Kevin Spencer" <kevin@takempis.com> wrote in message
    > news:eD3sJ3sSDHA.1748@TK2MSFTNGP11.phx.gbl...
    > > You're halfway AWAY there. You were closer when you started. The
    > Connection
    > > String would not change. You are still connecting to a comma-delimited
    > text
    > > file, so you would certainly NOT use the Jet OLE DB driver, which is for
    > > Access databases. You would use the same Connection String you used
    > before.
    > > You are connecting via an ODBC driver, so you would use the
    > System.Data.Odbc
    > > Namespace, and the classes therein.
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > .Net Developer
    > > [url]http://www.takempis.com[/url]
    > > Big things are made up of
    > > lots of little things.
    > >
    > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > news:e6LwQBkSDHA.3132@tk2msftngp13.phx.gbl...
    > > >
    > > > Thanks....
    > > > ok.... I'm halfway there...I think.
    > > > I have the below code... but it won't let me connect. Is this wrong?
    > > >
    > > > Dim oOleDbConnection As OleDbConnection
    > > >
    > > > Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;"
    > > >
    > > > oOleDbConnection = New OleDb.OleDbConnection(sConnString)
    > > >
    > > > oOleDbConnection.Open()
    > > >
    > > >
    > > >
    > > > Dim oleCmd As OleDbCommand
    > > >
    > > > With oleCmd
    > > >
    > > > .Connection = oOleDbConnection
    > > >
    > > > .CommandType = CommandType.Text
    > > >
    > > > .CommandText = "SELECT * FROM FieldMappings.csv"
    > > >
    > > > End With
    > > >
    > > >
    > > >
    > > > Dim oleAdapter As New OleDbDataAdapter()
    > > >
    > > > Dim dataset As DataSet
    > > >
    > > > oleAdapter.SelectCommand = New OleDbCommand(oleCmd.CommandText,
    > > > oOleDbConnection)
    > > >
    > > > oleAdapter.Fill(DataSet)
    > > >
    > > >
    > > >
    > > >
    > > > "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    > > > news:OU12IjjSDHA.3144@tk2msftngp13.phx.gbl...
    > > > > Perhaps you'll be able to find the connection string you need here:
    > > > > [url]http://www.able-consulting.com/ADO_Conn.htm[/url]
    > > > >
    > > > > --
    > > > > I hope this helps,
    > > > > Steve C. Orr, MCSD
    > > > > [url]http://Steve.Orr.net[/url]
    > > > >
    > > > >
    > > > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > > > news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > > > > > Hello,
    > > > > > before dot net I could open up a sqlconnection to a txt/csv file
    > with
    > > > the
    > > > > > connection string =
    > > > > > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    > > > > >
    > > > > > how can I do that in dotnet?
    > > > > >
    > > > > > Thanks,
    > > > > > V
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Kevin Spencer Guest

  8. #7

    Default Re: reading from CSV

    There's more than one way to skin a cat.
    If I were in your shoes, rather than messing around with all these drivers
    and connection strings and whatnot, I'd just open the file directly and
    parse through the values.
    With a CSV the code should be trivial.
    Here's more info:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiofileinfoclassopentopic3.asp[/url]
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemstringclasssplittopic.asp[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "Vicky S" <rainstorms@comcast.net> wrote in message
    news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > Hello,
    > before dot net I could open up a sqlconnection to a txt/csv file with the
    > connection string =
    > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    >
    > how can I do that in dotnet?
    >
    > Thanks,
    > V
    >
    >

    Steve C. Orr, MCSD Guest

  9. #8

    Default Re: reading from CSV


    Thanks.
    Now I can reference odbc through microsoft.data.odbc (not system.data.odbc -
    is this correct?)

    Also, in this line..
    odbcAdapter.SelectCommand = New OdbcCommand("SELECT * FROM
    AptusDLFieldMappings.csv", odbcConn)

    does the file have to be in the same dir as the executable path? I'm getting
    an error that value cannot be null on this line :
    odbcAdapter.Fill(dataset)



    "Kevin Spencer" <kevin@takempis.com> wrote in message
    news:%237U6pkuSDHA.2128@TK2MSFTNGP12.phx.gbl...
    > You can download the .NET Framework Data Provider for ODBC at
    > [url]http://msdn.microsoft.com/downloads[/url].
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > [url]http://www.takempis.com[/url]
    > Big things are made up of
    > lots of little things.
    >
    > "Vicky S" <rainstorms@comcast.net> wrote in message
    > news:OB$FdstSDHA.1036@TK2MSFTNGP10.phx.gbl...
    > >
    > > Hrm.. I'm using .net framework 1.0 and I don't think odbc is supported
    > > there.
    > > is there another way?
    > >
    > >
    > > "Kevin Spencer" <kevin@takempis.com> wrote in message
    > > news:eD3sJ3sSDHA.1748@TK2MSFTNGP11.phx.gbl...
    > > > You're halfway AWAY there. You were closer when you started. The
    > > Connection
    > > > String would not change. You are still connecting to a comma-delimited
    > > text
    > > > file, so you would certainly NOT use the Jet OLE DB driver, which is
    for
    > > > Access databases. You would use the same Connection String you used
    > > before.
    > > > You are connecting via an ODBC driver, so you would use the
    > > System.Data.Odbc
    > > > Namespace, and the classes therein.
    > > >
    > > > --
    > > > HTH,
    > > >
    > > > Kevin Spencer
    > > > Microsoft MVP
    > > > .Net Developer
    > > > [url]http://www.takempis.com[/url]
    > > > Big things are made up of
    > > > lots of little things.
    > > >
    > > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > > news:e6LwQBkSDHA.3132@tk2msftngp13.phx.gbl...
    > > > >
    > > > > Thanks....
    > > > > ok.... I'm halfway there...I think.
    > > > > I have the below code... but it won't let me connect. Is this wrong?
    > > > >
    > > > > Dim oOleDbConnection As OleDbConnection
    > > > >
    > > > > Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;"
    > > > >
    > > > > oOleDbConnection = New OleDb.OleDbConnection(sConnString)
    > > > >
    > > > > oOleDbConnection.Open()
    > > > >
    > > > >
    > > > >
    > > > > Dim oleCmd As OleDbCommand
    > > > >
    > > > > With oleCmd
    > > > >
    > > > > .Connection = oOleDbConnection
    > > > >
    > > > > .CommandType = CommandType.Text
    > > > >
    > > > > .CommandText = "SELECT * FROM FieldMappings.csv"
    > > > >
    > > > > End With
    > > > >
    > > > >
    > > > >
    > > > > Dim oleAdapter As New OleDbDataAdapter()
    > > > >
    > > > > Dim dataset As DataSet
    > > > >
    > > > > oleAdapter.SelectCommand = New OleDbCommand(oleCmd.CommandText,
    > > > > oOleDbConnection)
    > > > >
    > > > > oleAdapter.Fill(DataSet)
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    > > > > news:OU12IjjSDHA.3144@tk2msftngp13.phx.gbl...
    > > > > > Perhaps you'll be able to find the connection string you need
    here:
    > > > > > [url]http://www.able-consulting.com/ADO_Conn.htm[/url]
    > > > > >
    > > > > > --
    > > > > > I hope this helps,
    > > > > > Steve C. Orr, MCSD
    > > > > > [url]http://Steve.Orr.net[/url]
    > > > > >
    > > > > >
    > > > > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > > > > news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > > > > > > Hello,
    > > > > > > before dot net I could open up a sqlconnection to a txt/csv file
    > > with
    > > > > the
    > > > > > > connection string =
    > > > > > > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    > > > > > >
    > > > > > > how can I do that in dotnet?
    > > > > > >
    > > > > > > Thanks,
    > > > > > > V
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Vicky S Guest

  10. #9

    Default Re: reading from CSV

    Well, now we're getting into an area that I'm not experienced in (using a
    CSV as a data source). I can only suppose that your Connection String points
    to the location of the CSV file. I'm not sure how you specify the table in
    your SELECT statement.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of little things.

    "Vicky S" <rainstorms@comcast.net> wrote in message
    news:%236svXawSDHA.2276@TK2MSFTNGP10.phx.gbl...
    >
    > Thanks.
    > Now I can reference odbc through microsoft.data.odbc (not
    system.data.odbc -
    > is this correct?)
    >
    > Also, in this line..
    > odbcAdapter.SelectCommand = New OdbcCommand("SELECT * FROM
    > AptusDLFieldMappings.csv", odbcConn)
    >
    > does the file have to be in the same dir as the executable path? I'm
    getting
    > an error that value cannot be null on this line :
    > odbcAdapter.Fill(dataset)
    >
    >
    >
    > "Kevin Spencer" <kevin@takempis.com> wrote in message
    > news:%237U6pkuSDHA.2128@TK2MSFTNGP12.phx.gbl...
    > > You can download the .NET Framework Data Provider for ODBC at
    > > [url]http://msdn.microsoft.com/downloads[/url].
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > .Net Developer
    > > [url]http://www.takempis.com[/url]
    > > Big things are made up of
    > > lots of little things.
    > >
    > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > news:OB$FdstSDHA.1036@TK2MSFTNGP10.phx.gbl...
    > > >
    > > > Hrm.. I'm using .net framework 1.0 and I don't think odbc is supported
    > > > there.
    > > > is there another way?
    > > >
    > > >
    > > > "Kevin Spencer" <kevin@takempis.com> wrote in message
    > > > news:eD3sJ3sSDHA.1748@TK2MSFTNGP11.phx.gbl...
    > > > > You're halfway AWAY there. You were closer when you started. The
    > > > Connection
    > > > > String would not change. You are still connecting to a
    comma-delimited
    > > > text
    > > > > file, so you would certainly NOT use the Jet OLE DB driver, which is
    > for
    > > > > Access databases. You would use the same Connection String you used
    > > > before.
    > > > > You are connecting via an ODBC driver, so you would use the
    > > > System.Data.Odbc
    > > > > Namespace, and the classes therein.
    > > > >
    > > > > --
    > > > > HTH,
    > > > >
    > > > > Kevin Spencer
    > > > > Microsoft MVP
    > > > > .Net Developer
    > > > > [url]http://www.takempis.com[/url]
    > > > > Big things are made up of
    > > > > lots of little things.
    > > > >
    > > > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > > > news:e6LwQBkSDHA.3132@tk2msftngp13.phx.gbl...
    > > > > >
    > > > > > Thanks....
    > > > > > ok.... I'm halfway there...I think.
    > > > > > I have the below code... but it won't let me connect. Is this
    wrong?
    > > > > >
    > > > > > Dim oOleDbConnection As OleDbConnection
    > > > > >
    > > > > > Dim sConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;"
    > > > > >
    > > > > > oOleDbConnection = New OleDb.OleDbConnection(sConnString)
    > > > > >
    > > > > > oOleDbConnection.Open()
    > > > > >
    > > > > >
    > > > > >
    > > > > > Dim oleCmd As OleDbCommand
    > > > > >
    > > > > > With oleCmd
    > > > > >
    > > > > > .Connection = oOleDbConnection
    > > > > >
    > > > > > .CommandType = CommandType.Text
    > > > > >
    > > > > > .CommandText = "SELECT * FROM FieldMappings.csv"
    > > > > >
    > > > > > End With
    > > > > >
    > > > > >
    > > > > >
    > > > > > Dim oleAdapter As New OleDbDataAdapter()
    > > > > >
    > > > > > Dim dataset As DataSet
    > > > > >
    > > > > > oleAdapter.SelectCommand = New OleDbCommand(oleCmd.CommandText,
    > > > > > oOleDbConnection)
    > > > > >
    > > > > > oleAdapter.Fill(DataSet)
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > > > "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    > > > > > news:OU12IjjSDHA.3144@tk2msftngp13.phx.gbl...
    > > > > > > Perhaps you'll be able to find the connection string you need
    > here:
    > > > > > > [url]http://www.able-consulting.com/ADO_Conn.htm[/url]
    > > > > > >
    > > > > > > --
    > > > > > > I hope this helps,
    > > > > > > Steve C. Orr, MCSD
    > > > > > > [url]http://Steve.Orr.net[/url]
    > > > > > >
    > > > > > >
    > > > > > > "Vicky S" <rainstorms@comcast.net> wrote in message
    > > > > > > news:udqCdKjSDHA.1552@TK2MSFTNGP10.phx.gbl...
    > > > > > > > Hello,
    > > > > > > > before dot net I could open up a sqlconnection to a txt/csv
    file
    > > > with
    > > > > > the
    > > > > > > > connection string =
    > > > > > > > Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.
    > > > > > > >
    > > > > > > > how can I do that in dotnet?
    > > > > > > >
    > > > > > > > Thanks,
    > > > > > > > V
    > > > > > > >
    > > > > > > >
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Kevin Spencer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139