Search found 100 matches: autoincrement

Return to advanced search

Re: Problem with lock record (dbf/cdx)

resulting in a duplicate record in the table The best way to avoid duplicates in a multi-user environment is to use AutoIncrement field. ( FieldType "+" ) Example: Field ID in fwh\samples\customer.dbf While adding a record, we should not assign any value to this AutoInc ...
by wartiaga
Sat Jun 15, 2024 12:24 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Problem with lock record (dbf/cdx)
Replies: 9
Views: 720

Re: Problem with lock record (dbf/cdx)

resulting in a duplicate record in the table The best way to avoid duplicates in a multi-user environment is to use AutoIncrement field. ( FieldType "+" ) Example: Field ID in fwh\samples\customer.dbf While adding a record, we should not assign any value to this AutoInc ...
by nageswaragunupudi
Sat Jun 15, 2024 3:52 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Problem with lock record (dbf/cdx)
Replies: 9
Views: 720

Re: Question about performance RowSet

... "states", nil, { aRow } )endif  But insert not work. Table `states` has 3 fields: id, code, name where id is autoincrement field This should work: oCn:Upsert( "states", nil, { { 0, "KK", "KState" } } ) ...
by Eroni
Wed Mar 20, 2024 7:01 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Question about performance RowSet
Replies: 19
Views: 6352

Re: Question about performance RowSet

... } oCn:Upsert( "states", nil, { aRow } ) endif But insert not work. Table `states` has 3 fields: id, code, name where id is autoincrement field This should work: oCn:Upsert( "states", nil, { { 0, "KK", "KState" } } ) ...
by nageswaragunupudi
Wed Mar 20, 2024 3:19 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Question about performance RowSet
Replies: 19
Views: 6352

PostgreSQL and Fivewin

... DBF Data using "Fivewin Way" where FIELD "ID" was add FIELD "ID" is used as PRIMARY KEY and work "autoincrement" but METHOD SavePQQ() use currval() AFTER (!) INSERT when APPEND so Fivewin Sample c:\fwh\samples\testpgre.prg FAIL when try to APPEND ...
by Jimmy
Fri Aug 25, 2023 4:10 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: PostgreSQL and Fivewin
Replies: 1
Views: 218

Re: METHOD SavePQQ() need "id" or how to use own PRIMARY KEY ?

... it is convenient for him to consolidate tables from different branches into the main table at head quarters. Though I personally prefer using one autoincrement integer field as primary key, when we make FWH library we need to cater to all kinds of programmers and their needs and preferences.
by nageswaragunupudi
Thu Aug 03, 2023 4:57 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: METHOD SavePQQ() need "id" or how to use own PRIMARY KEY ?
Replies: 21
Views: 1698

Re: "id" for PRIMARY KEY ?

... who wishes to gain control of your application and then try to insert or "Inject" malicious rows into your database .. If you have autoincrement set on your primary key .. there is nothing to stop a malicious attack to insert new rows into your SQL table. If I, on the other hand, ...
by Rick Lipkin
Tue Jul 25, 2023 6:46 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: "id" for PRIMARY KEY ?
Replies: 9
Views: 847

Re: "id" for PRIMARY KEY ?

does Fivewin use Name "id" as default also for "other" SQL :?: Yes, by default for autoincrement primary field. Programmer can choose different field names. FWH functions allow specifying the structure of a table using a structure like DBSTRUCT(). FWH creates ...
by nageswaragunupudi
Sun Jul 23, 2023 11:23 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: "id" for PRIMARY KEY ?
Replies: 9
Views: 847

Re: Campo autoincremental en DBF

* src/rdd/dbf1.c + added support for autoincrement fields with counter longer then 4 bytes Warning: if someone created tables with such fields i.e. { "I:+", 8, 0 } after my modification which added support for AutoInc flags in all ...
by carlos vargas
Thu Oct 27, 2022 10:40 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Campo autoincremental en DBF
Replies: 7
Views: 1005

Re: GetAutoIncrement en MARIADB?

Necesito conocer el ultimo indice (autoincrement) que se le dio a una tabla. Antes lo hacia con GetAutoIncrement y ahora con mariadb? gracias. Saludos, yo lo hago asi, inmediatamente luego del insert cQuery := "SELECT LAST_INSERT_ID() ...
by JoseAlvarez
Fri Oct 01, 2021 2:27 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: GetAutoIncrement en MARIADB?
Replies: 1
Views: 327

GetAutoIncrement en MARIADB?

Necesito conocer el ultimo indice (autoincrement) que se le dio a una tabla.
Antes lo hacia con GetAutoIncrement y ahora con mariadb?

gracias.
by goosfancito
Fri Oct 01, 2021 1:59 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: GetAutoIncrement en MARIADB?
Replies: 1
Views: 327

Re: Consulta sobre MySql y autoincrement

Saludos colega... Gracias por tu colaboracion. En mi caso, hago un SELECT previo porque alli uso la clausula FOR UPDATE que es la que me va a BLOQUEAR el registro y no permitir que nadie mas accese la tabla al mismo tiempo y pueda duplicarse el valor del consecutivo. Sin embargo, con tu idea puedo a...
by JoseAlvarez
Wed Sep 08, 2021 10:40 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Consulta sobre MySql y autoincrement
Replies: 6
Views: 923

Re: Consulta sobre MySql y autoincrement

Hola, A mi se me ocurre algo sin tener que hacer ningún query previo e incrementar en una variable. No se si entendí tu idea, pero esto debería funcionar: cQuery:="UPDATE TUTABLA SET CAMPO=CAMPO + 1 " // No pongo ningún Where ya que comentas que es solo un registro.  Espero te sirva la ide...
by jrestojeda
Wed Sep 08, 2021 10:08 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Consulta sobre MySql y autoincrement
Replies: 6
Views: 923

Re: Consulta sobre MySql y autoincrement

... la colaboracion en sus respuestas. Pero creo que no me explique bien sobre lo que quiero. Lo que me gustaria hacer (si se puede) es que un campo autoincrement se vaya incrementando SIN HACER UN INSERT. Quiero llevar un contador, y por los momentos lo hago asi:       cTabla:= _cPrefijo+'_docventatemp'  ...
by JoseAlvarez
Wed Sep 08, 2021 2:44 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Consulta sobre MySql y autoincrement
Replies: 6
Views: 923

Re: Consulta sobre MySql y autoincrement

Another way is

Code: Select all  Expand view
ALTER TABLE tblname AUTO_INCREMENT = 52;
by anserkk
Fri Sep 03, 2021 5:20 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Consulta sobre MySql y autoincrement
Replies: 6
Views: 923
Next

Return to advanced search