Problema Al Pasar Fecha De ValueBox A ColumnView[resuelto]


Subject: Problema Al Pasar Fecha De ValueBox A ColumnView[resuelto]
alguien sabe porque en el columnView la fecha aparece deformada??

fecha: 10/03/2015

vista en el columnview:

77


SentenciaSQL = "insert into Lista1 (id,ingreso,nombre) values ("
SentenciaSQL &= txtID.Text & ",'" & vboxIngreso.Value &"'" & ",'" & txtNombre.Text & "')"

Print SentenciaSQL
hconn.EXEC(SentenciaSQL)

Last edited by v3ctor on Wednesday, 11 March 2015, 13:53; edited 2 times in total
Subject: Re: Problema Al Pasar Fecha De ValueBox A ColumnView
Los valores de los controles de gambas están normalmente (no me atrevo a decir siempre) adaptados al idioma y las locales del ordenador que uses. Los valores que procesan las distintas bases de datos... pues no.
Por otra parte estás haciendo ésto:

Citar:
,'" & vboxIngreso.Value &"'" &

Es decir, entrecomillas el valor del control directamente, con lo que conviertes en cadena lo que no lo es, ValueBox.Value es un número.

Si en lugar de ésto:
SentenciaSQL = "insert into Lista1 (id,ingreso,nombre) values ("
SentenciaSQL &= txtID.Text & ",'" & vboxIngreso.Value &"'" & ",'" & txtNombre.Text & "')"

Hicieses ésto:
SentenciaSQL = "insert into Lista1 (id,ingreso,nombre) values (&1,&2,&3)",txtID.Text, vboxIngreso.Value , txtNombre.Text)

o Esto:
miresult=miconexion.create("Lista1")
with miresult
.id=txtID.Text
.ingreso=vboxIngreso.Value
.nombe=txtNombre.value
end with
miconexion.update

No tendrías problemas. Pero son tantas las veces que ya se te ha dicho, que supongo que una más no te apartara de las malas costumbres...

Saludos

Last edited by shordi on Tuesday, 10 March 2015, 18:04; edited 2 times in total
Profile PM  
Subject: Re: Problema Al Pasar Fecha De ValueBox A ColumnView
Shordi:

Citar:
Pero son tantas las veces que ya se te ha dicho

Precisamente hoy, he escrito en mi blog, uno los comentario que hizo hace tiempo jguardon explicando el tema.
http://jsbsan.blogspot.com.es/2015/...en-gambas3.html

¿cuasualidad? No... es que yo soy también de malas costumbres

Subject: Re: Problema Al Pasar Fecha De ValueBox A ColumnView
SentenciaSQL = "insert into Lista1 (id,ingreso,nombre) values (&1,&2,&3)",txtID.Text, vboxIngreso.Value , txtNombre.Text)



me da este error hay un problema de sintaxis:
5555

shordi un poco soy porfiado si, pero cansa intentar una y otra vez y que una linea te enloquezca entonces a la primera que anda listo no busco la forma mas correcta sino la que logro hacer andar.

pero esta vez voy a buscarla forma ya que no tengo apuro.

Subject: Re: Problema Al Pasar Fecha De ValueBox A ColumnView
Citar:

SentenciaSQL = "insert into Lista1 (id,ingreso,nombre) values (&1,&2,&3)",txtID.Text, vboxIngreso.Value , txtNombre.Text)

Falta la llamada al exec (es lo que tiene escribir deprisa y cortar y pegar)
miconexion.Exec("insert into Lista1 (id,ingreso,nombre) values (&1,&2,&3)",txtID.Text, vboxIngreso.Value , txtNombre.Text)

Last edited by shordi on Wednesday, 11 March 2015, 01:31; edited 1 time in total
Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo

Generation Time: 0.0919s (PHP: -29% SQL: 129%)
SQL queries: 26 - Debug Off - GZIP Enabled