C# to Access Base de Dados [expert]
|
13-04-2012, 15:16
(Esta mensagem foi modificada pela última vez a: 13-04-2012 15:17 por Charters.)
Mensagem: #1
|
|||
|
|||
C# to Access Base de Dados [expert]
Hello, i am doing an application (in C# Windows Forms) which consists of basically database connect in between C# and Microsoft Access 2010. To show the Database from MS Access i have a datagridview.
The connection between them was created with the help of C# tool itself (databinding or something). It has 5 collumns and only two of the have numeric format. One of them is double, altho, when i'm saving (from the datagridview) let's say, 1172,44 into Microsoft Access and then, re-open the application, the number i get is 117244 (which misses the comma). I don't know what's causing this, i have tried switching to decimal, single and of course double. Tryed using the System.CultureInfo way to go around but it just seems like it won't fix anything. Also tried to parse the number on the fly but couldn't do it. The last thread i did was closed because Apparently it was vague.. Saving a double value to Access Database From C# There it is so you can see what i've progressed since i started playing around with all the settings and configurations. I don't really know what else to do and i just really think updating an Access database with a double should be an easy task but it's not as it seems. Code Used to Update Access Database from Datagridview: Código: private void button1_Click(object sender, EventArgs e) Eu tenho isto em vários forums estrangeiros, já fiz de tudo e começo a desconfiar que o problema não está no C# mas sim na base de dados Access . As colunas estão formatadas para guardarem números double . Logo deveria dar para utilizar a vírgula. No entanto ao fazer loading à base de dados para uma datagridview a vírgula desaparece como disse em cima várias vezes. Já experimentei mudar as definições regionais e não é disso pelo menos não do Visual Studio (C#). |
|||
23-04-2012, 22:33
Mensagem: #2
|
|||
|
|||
RE: C# to Access Base de Dados [expert]
que tipo de dado escolheste quando criaste o campo?
https://caloriaspordia.com/ |
|||
24-04-2012, 16:18
Mensagem: #3
|
|||
|
|||
RE: C# to Access Base de Dados [expert]
Já arranjei obrigado . Os dados eram double double mas não sei porquê não funcionava . Eu pus texto no access e double no c# e acabou por funcionar (:
|
|||
« Mais Antigo | Mais Recente »
|
Utilizadores a ver este tópico: 1 Visitante(s)