Re: [Gambas-user] gb.db: NOT NULL fields?

2014-09-08 Thread Benoît Minisini
Le 08/09/2014 22:28, Tobias Boege a écrit : > Hi, > > when creating a table in a database, I wonder if it's possible to have > fields tagged as "NOT NULL" [0]. I don't know if it's there already or > if it would be portable across other DMBS (just asking on behalf of > another person). > > I would

[Gambas-user] gb.db: NOT NULL fields?

2014-09-08 Thread Tobias Boege
Hi, when creating a table in a database, I wonder if it's possible to have fields tagged as "NOT NULL" [0]. I don't know if it's there already or if it would be portable across other DMBS (just asking on behalf of another person). I would imagine a new optional argument to Table.Fields.Add()...

Re: [Gambas-user] gb.db: Primary Key of a INSERT

2014-02-03 Thread Rob Kudla
On 02/03/2014 09:34 AM, Oliver Etchebarne Bejarano wrote: > How can I obtain the last AUTO_INCREMENT field after I run the > Result.Update() on a new registry? I'm using a MySQL db. On the same connection object, "select LAST_INSERT_ID() from tablename;" But will Result.Update() insert a new rec

[Gambas-user] gb.db: Primary Key of a INSERT

2014-02-03 Thread Oliver Etchebarne Bejarano
Hi everybody. How can I obtain the last AUTO_INCREMENT field after I run the Result.Update() on a new registry? I'm using a MySQL db. Thanks! -- /Oliver Etchebarne Bejarano/ Gerente General *Paperclip X10 SRL* ¡Visita la Tienda.X10!htt

Re: [Gambas-user] gb.db Connections questions

2013-12-16 Thread Benoît Minisini
Le 16/12/2013 06:53, Bruce a écrit : > Fiddling around under the hood > > Is there any hidden reason why Connections is readonly? > Because it is a collection of connections defined in the project, so it is read-only. > Is there any reason for it not having a Count property? Not at all. I

[Gambas-user] gb.db Connections questions

2013-12-15 Thread Bruce
Fiddling around under the hood Is there any hidden reason why Connections is readonly? Is there any reason for it not having a Count property? The reason being, I am trying to get rid of my Application override/inheritance problem from this morning. I have run into an issue where a) we con

Re: [Gambas-user] gb.db Unknown symbol 'Fields' in class 'Connection'

2013-12-03 Thread paulwheeler
The correct one is: htable.Fields I assume you have this line in your code: Dim hTable As Table Your code is similar to mine, but I do not use the "with". I do the full line. hTable.Fields.Add("cod_ficha", db.String, 20) Try doing it that way. Maybe there is a bug in the "With"??? paul On

[Gambas-user] gb.db Unknown symbol 'Fields' in class 'Connection'

2013-11-30 Thread PICCORO McKAY Lenz
and then i have this error when run in another runtime environment: Unknown symbol 'Fields' in class 'Connection' i have this code: If Not consq.Tables.Exist("sysasis_listado") Then hTable = consq.Tables.Add("sysasis_listado") With hTable.Fields

[Gambas-user] GB.DB Edit use string with numbers: wrong or cannnot scape?

2013-07-16 Thread PICCORO McKAY Lenz
See the documentation: http://gambasdoc.org/help/comp/gb.db/db/edit that seems the parameters if provides a text but this text only have numbers , interprete this parameter as number (such integer) and if column is type Varchar, resultset never retunrs any results.. how can i force the parameter a

Re: [Gambas-user] gb.db autoincrement ?

2008-10-22 Thread Doriano Blengino
[EMAIL PROTECTED] ha scritto: > Hi Doriano > > As the description says, the last_inserted_id() is during the same > connection reserved for the client. > I would recommend to use a stored procedure. Indeed, why not delegate > the SQL thing to the server. > The first time it seems to be expensive,

Re: [Gambas-user] gb.db autoincrement ?

2008-10-22 Thread [EMAIL PROTECTED]
necessary. Regards, Werner(007) [EMAIL PROTECTED] schrieb: Message: 4 Date: Mon, 20 Oct 2008 09:54:18 +0200 From: Doriano Blengino <[EMAIL PROTECTED]> Subject: Re: [Gambas-user] gb.db autoincrement ? To: mailing list for gambas users Message-ID: <[EMAIL PROTECTED]> Content-Type

Re: [Gambas-user] gb.db autoincrement ?

2008-10-20 Thread Doriano Blengino
Doriano Blengino ha scritto: > [EMAIL PROTECTED] ha scritto: > >> But in case you are using mySQL there is the function LAST_INSERT_ID (), >> see: >> http://dev.mysql.com/doc/refman/5.1/en/information-functions.html#function_last-insert-id. >> >> > About the Last_insert_ID(), I read about

Re: [Gambas-user] gb.db autoincrement ?

2008-10-18 Thread Doriano Blengino
[EMAIL PROTECTED] ha scritto: > Hi Doriano > > With transactions there are many different lock levels, look at help. > > But in case you are using mySQL there is the function LAST_INSERT_ID (), > see: > http://dev.mysql.com/doc/refman/5.1/en/information-functions.html#function_last-insert-id. > >

Re: [Gambas-user] gb.db autoincrement ?

2008-10-17 Thread [EMAIL PROTECTED]
Hi Doriano With transactions there are many different lock levels, look at help. But in case you are using mySQL there is the function LAST_INSERT_ID (), see: http://dev.mysql.com/doc/refman/5.1/en/information-functions.html#function_last-insert-id. Other vendors maybe have also functions or va

Re: [Gambas-user] gb.db autoincrement ?

2008-10-17 Thread Doriano Blengino
Benoit Minisini ha scritto: > On vendredi 17 octobre 2008, Doriano Blengino wrote: > >> Kari Laine ha scritto: >> >>> Hi, >>> >>> i cannot figure out how the get inserted autoincrement column right after >>> addition to table. >>> >>> invoice = db.create("invoices") >>> invoice!numb

Re: [Gambas-user] gb.db autoincrement ?

2008-10-16 Thread Benoit Minisini
On vendredi 17 octobre 2008, Doriano Blengino wrote: > Kari Laine ha scritto: > > Hi, > > > > i cannot figure out how the get inserted autoincrement column right after > > addition to table. > > > > I have > > > > rResult3 = $hConn.Create("files") > > > > rResult3!filen

Re: [Gambas-user] gb.db autoincrement ?

2008-10-16 Thread Doriano Blengino
Kari Laine ha scritto: > Hi, > > i cannot figure out how the get inserted autoincrement column right after > addition to table. > > I have > > rResult3 = $hConn.Create("files") > > rResult3!filename = sFile > rResult3!md5sum = MUtils.md5sum(sDir, sFile) > rResult3!l

Re: [Gambas-user] gb.db autoincrement ?

2008-10-16 Thread Jacky
Le Thursday 16 October 2008 22:08:22 Kari Laine, vous avez écrit : > Hi, > > i cannot figure out how the get inserted autoincrement column right after > addition to table. > > I have > > rResult3 = $hConn.Create("files") > > rResult3!filename = sFile > rResult3!md5sum

[Gambas-user] gb.db autoincrement ?

2008-10-16 Thread Kari Laine
Hi, i cannot figure out how the get inserted autoincrement column right after addition to table. I have rResult3 = $hConn.Create("files") rResult3!filename = sFile rResult3!md5sum = MUtils.md5sum(sDir, sFile) rResult3!lastaccess = Stat(sdir &/ sFile, TRUE).LastAc

Re: [Gambas-user] gb.db

2008-10-08 Thread Benoit Minisini
On mercredi 08 octobre 2008, Kari Laine wrote: > Hi, > > I am writing a test program and I am little stuck with the big fields in > gb.db. Could someone tell me please? > > what type I define to use the following MySQL fields? > > VARCHAR(*M*), VARBINARY(*M*) *L* + 1 bytes if column values require

Re: [Gambas-user] gb.db

2008-10-08 Thread David Villalobos Cambronero
Hi, maybe use gb.db.mysql. Regards -- David - Original Message From: Kari Laine <[EMAIL PROTECTED]> To: mailing list for gambas users Sent: Wednesday, October 8, 2008 10:30:08 AM Subject: [Gambas-user] gb.db Hi, I am writing a test program and I am little stuck with t

[Gambas-user] gb.db

2008-10-08 Thread Kari Laine
Hi, I am writing a test program and I am little stuck with the big fields in gb.db. Could someone tell me please? what type I define to use the following MySQL fields? VARCHAR(*M*), VARBINARY(*M*) *L* + 1 bytes if column values require 0 – 255 bytes, *L* + 2 bytes if values may require more than