Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:14:15+00:00 2026-06-10T05:14:15+00:00

Here is my code: OdbcConnection conn = new OdbcConnection(Driver={Microsoft Text Driver (*.txt; *.csv)};DSN=scrapped.csv); conn.Open();

  • 0

Here is my code:

            OdbcConnection conn = new OdbcConnection("Driver={Microsoft Text Driver (*.txt; *.csv)};DSN=scrapped.csv");
        conn.Open();
        OdbcCommand foo = new OdbcCommand(@"SELECT * FROM [scrapped.csv] WHERE KWOTA < 100.00", conn);
        IDataReader dr = foo.ExecuteReader();
        StreamWriter asd = new StreamWriter("outfile.txt");
        while (dr.Read())
        {
            int cols = dr.GetSchemaTable().Rows.Count;
            for (int i = 0; i < cols; i++)
            {
                asd.Write(string.Format("{0};",dr[i].ToString()));
            }
            asd.WriteLine();
        }
        asd.Flush();
        asd.Close();
        dr.Close();
        conn.Close();

Here is my Scheme.ini

      [scrapped.csv]

Format=Delimited(;)
NumberDigits=2
CurrencyThousandSymbol= 
CurrencyDecimalSymbol=,
CurrencyDigits=2

Col1=DataOperacji Date
Col2=DataKsiegowania Date
Col3=OpisOperacji Text
Col4=Tytul Text
Col5=NadawcaOdbiorca Text
Col6=NumerKonta Text
Col7=Kwota Currency
Col8=SaldoPoOperacji Currency

Here I have sample from my CSV:

2013-01-22;2013-08-24;notmatter;"notmatter";"notmatter";'notmatter';7 111,55;10 222,20;
2013-03-26;2013-08-23;notmatter;"notmatter";"notmatter";'notmatter';-275,00;15 466,24;

So even if I have date and currency set in scheme.ini and regional settings (which should be used by odbc by defult but are not) values which i write to output file are total mess.

They are empty if there is space (my local thousend delimiter) and if I have value like 15,45 i got 15,4500 instead.

Date fields also behave abnormal, and even if I insert to scheme.ini DateTimeFormat I get nothing like I specified in format.

Any help would be appreciated, what to do with it, I would like to use ODBC and query CSV data like database with WHERE something = something

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:14:17+00:00Added an answer on June 10, 2026 at 5:14 am

    I added a line to your schema.ini and ran against an adodb connection and it worked for me in the matter of dates, other bits are still not right. Note DateTimeFormat.

    [scrapped.csv]
    Format=Delimited(;)
    NumberDigits=2
    CurrencyThousandSymbol= 
    CurrencyDecimalSymbol=,
    CurrencyDigits=2
    DateTimeFormat="yyyy-mm-dd"
    
    Col1=DataOperacji Date
    Col2=DataKsiegowania Date
    Col3=OpisOperacji Text
    Col4=Tytul Text
    Col5=NadawcaOdbiorca Text
    Col6=NumerKonta Text
    Col7=Kwota Currency
    Col8=SaldoPoOperacji Currency
    

    You may also need:

    ColNameHeader=False
    MaxScanRows=0
    

    But at the moment, I cannot see a way to get a space accepted as the CurrencyThousandSymbol

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's some code: OdbcConnection connection = new OdbcConnection(@DRIVER={MySQL ODBC 5.1 Driver};SERVER= + ip +
Here is my code: private const string CONNECTION_STRING = Driver={Microsoft dBase Driver (*.dbf)}; +
I'm trying to match this block here /code\ int foo(string $bar, int $bleh); Simple
Below is my sample text file { Here is my schema file [Sample File.txt]
here code delegate void CheckNewsDelegate(); void CheckNews() { frmNews news = new frmNews(); news.Show();
The script is on jsfiddle here : CODE What it does at the moment
Ok the error is showing up somewhere in this here code if($error==false) { $query
Here is code my jqgrid editing through form. $(#DataEnergy).jqGrid('navGrid', '#pagergrid', {}, //options {editdata: {
Here my code, I need to insert into mysql database I have mysql,php,android 1)
Here is code from MSDN . I don't understand why the work isn't just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.