I have WinXP but my friend Vista.
Here is the code:
string AccessKonekcija2 = null; AccessKonekcija2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\exports_blaise2\\" + textBox22.Text + ".mdb"; System.Data.OleDb.OleDbConnection AccessExcelKonekcija = new System.Data.OleDb.OleDbConnection(AccessKonekcija2); System.Data.OleDb.OleDbCommand AccessExcelKomanda = new System.Data.OleDb.OleDbCommand(); AccessExcelKomanda.Connection = AccessExcelKonekcija; AccessExcelKomanda.CommandText = "SELECT * INTO[Text;HDR=Yes;FMT=Delimited;DATABASE=C:\\exports_blaise2\\zips\\manipulai\\" + value3 + "\\" + textBox22.Text + "\\OUT].[" + value3 + "man.txt] FROM " + value3 + "man"; AccessExcelKonekcija.Open(); AccessExcelKomanda.ExecuteNonQuery(); AccessExcelKonekcija.Close();
And the error is:
http://uploadpic.org/storage/2011/fA...re4DT26l5O.png
Can someone tell me whats wrong ?
And how come that I can do that w/o an error.
But my friend not.
I already checked regional setting they are both equal.
Janis PeksaPosted Jul 8, 2011, 4:26 AM
Schema like this: .mdb to datagridview to text file.
Sam HobbsPosted Jul 7, 2011, 10:24 AM
Janis PeksaPosted Jul 7, 2011, 5:44 AM
Sam HobbsPosted Jul 7, 2011, 5:42 AM
Janis PeksaPosted Jul 7, 2011, 5:20 AM
I placed schema.ini file with needed information in it.
But C# rewrites it.
I'm going to put the data in dataGridView and than export to .txt.
I think it will work good.
VulpesPosted Jul 7, 2011, 5:15 AM
Janis PeksaPosted Jul 7, 2011, 1:59 AM
SELECT * INTO[Text;HDR=Yes;FMT=Delimited(;)
SELECT * INTO[Text;HDR=Yes;FMT=Delimited(|)
And still is ";" delimited.
I tried to change in regional settings "List seperator" to something else and no use of that.
I tried on other computer on who doesn't work delimited change to English (US) regional settings.
No changes for that and error appears.
Sam HobbsPosted Jul 7, 2011, 1:47 AM
Janis PeksaPosted Jul 7, 2011, 1:18 AM
And regional settings is EQUAL in global settings !!!!!!
Sam HobbsPosted Jul 6, 2011, 5:09 PM
I assume that the locale setting for the system that the error occurs in is set to use a "," (comma) as the decimal separator. So it makes sense that that would be a problem. If the file was created using "." (period) as the decimal separator then you need to tell OLEDB to use the correct decimal separator.
If you can change the way the file is created, I suggest using a delimited text format iinstead of CSV. If the data will never have tab characters in it then you can use a tab-delimited format. If the data might have tab characters in it then some other character could be used as a delimiter.
Finally, note that there are other ways to read CSV and tab-delimited text files. There are a few articles in this web site that suggest aternatives; I wrote one of them.
Suthish NairPosted Jul 6, 2011, 4:18 PM
Janis PeksaPosted Jul 6, 2011, 1:25 PM
And regional setting is not doing anything.
I already tried everything with regional settings.
Dorababu MekaPosted Jul 6, 2011, 10:00 AM
Make sure they match.
Standard (US) is ,.
for others it change so try as per your other wise it can lead to subtle errors like the one you're having
For further reference check here
http://blog.van-eerde.net/post/2011/05/17/Text-file-specification-field-separator-matches-decimal-separator-or-text-delimiter.aspx
Janis PeksaPosted Jul 6, 2011, 8:51 AM
Can someone help me ?
Tried everything from Google...
Janis PeksaPosted Jul 6, 2011, 4:34 AM
In regional settings I change "List seperator" and no changes.
It's delimits by default or smth with ";" on my PC.
But on others it's shows error u can see it on pic.
Suthish NairPosted Jul 6, 2011, 4:15 AM
Janis PeksaPosted Jul 6, 2011, 2:04 AM
Manish TewatiaPosted Jul 6, 2011, 1:54 AM
Janis PeksaPosted Jul 6, 2011, 1:53 AM
Suthish NairPosted Jul 6, 2011, 1:48 AM