[Gambas-user] Database! More Questions!
Steven Lobbezoo
steven at ...1652...
Fri Apr 20 16:42:22 CEST 2007
The samploe is in the attachement
Steven
Le vendredi 20 avril 2007 14:21, Hamilton Geminiano Andrioli Junior a écrit :
> Steven Lobbezoo escreveu:
> > Hi,
> >
> > Use db.Begin for start transaction
> > and db.Commit to end it.
> >
> > I personally do allmost everything with db.exec, so I can use ALL
> > features of MySQL
> >
> > Steven
> >
> > Le jeudi 19 avril 2007 19:33, Hamilton Geminiano Andrioli Junior a écrit :
> >> Hi there again!
> >>
> >> I need help (again!!!) So, when i was working with VB6, i used a Oracle
> >> Transational Server, then, when i nedded to make a lot of SQL
> >> requirement, i started a function:
> >>
> >> DataOracle.BeginTrans
> >>
> >> xxxx
> >> xxxx
> >> xxxx
> >> xxx
> >>
> >> DataOracle.CommitTrans
> >>
> >> Is There a Generic BeginTrans and CommitTrans in gambas?
> >> How to use then?
> >>
> >> I have to execute 3 SQL, inserting and updating data at same time, but
> >> if there was a error, ir have to procced a Rollback automaticaly.
> >>
> >> Anyone may help me?
> >>
> >> Regards
> >> Hamilton From Brazil!
> >>
> >> ------------------------------------------------------------------------
> >>- This SF.net email is sponsored by DB2 Express
> >> Download DB2 Express C - the FREE version of DB2 express and take
> >> control of your XML. No limits. Just data. Click to get it now.
> >> http://sourceforge.net/powerbar/db2/
> >> _______________________________________________
> >> Gambas-user mailing list
> >> Gambas-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> Steven,
>
> please, I really don't know how to use the db function.
> What i do is write a SQL like "Update xxx". then call the db.exec(sQL)
> and its done.
>
> Can you send me an example of how to update, insert, delete, and select
> with db. function?
>
> Please.
> Regards
> Hamilton From Brazil
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------- next part --------------
# Gambas Form File 1.0
{ Form Form
MoveScaled(0,0,96,83)
'Move(0,0,672,581)
Background = &HFFFFBF&
Expand = True
Text = ("")
Icon = Picture["icon:/16/color"]
AutoResize = True
{ ToolButton1 ToolButton TBs
Name = "ToolButton1"
MoveScaled(1,1,6,3)
'Move(7,7,42,21)
Background = &HFFFFBF&
Tag = "No|DESC"
ToolTip = ("Clique moi pour faire\nune tri sur la colonne")
Text = ("No")
Picture = Picture["icon:/16/redo"]
}
{ ToolButton2 ToolButton TBs
Name = "ToolButton2"
MoveScaled(9,1,11,3)
'Move(63,7,77,21)
Background = &HFFFFBF&
Tag = "Prenom|DESC"
ToolTip = ("Clique moi pour faire\nune tri sur la colonne")
Text = ("Prenom")
Picture = Picture["icon:/16/redo"]
}
{ ToolButton3 ToolButton TBs
Name = "ToolButton3"
MoveScaled(23,1,10,3)
'Move(161,7,70,21)
Background = &HFFFFBF&
Tag = "Nom|DESC"
ToolTip = ("Clique moi pour faire\nune tri sur la colonne")
Text = ("Nom")
Picture = Picture["icon:/16/redo"]
}
{ ToolButton4 ToolButton TBs
Name = "ToolButton4"
MoveScaled(41,1,12,3)
'Move(287,7,84,21)
Background = &HFFFFBF&
Tag = "Adresse|DESC"
ToolTip = ("Clique moi pour faire\nune tri sur la colonne")
Text = ("Adresse")
Picture = Picture["icon:/16/redo"]
}
{ ToolButton5 ToolButton TBs
Name = "ToolButton5"
MoveScaled(63,1,10,3)
'Move(441,7,70,21)
Background = &HFFFFBF&
Tag = "Ville|DESC"
ToolTip = ("Clique moi pour faire\nune tri sur la colonne")
Text = ("Ville")
Picture = Picture["icon:/16/redo"]
}
{ ToolButton6 ToolButton TBs
Name = "ToolButton6"
MoveScaled(82,1,9,3)
'Move(574,7,63,21)
Background = &HFFFFBF&
Tag = "Pays|DESC"
ToolTip = ("Clique moi pour faire\nune tri sur la colonne")
Text = ("Pays")
Picture = Picture["icon:/16/redo"]
}
{ VSplit1 VSplit
MoveScaled(0,4,96,79)
'Move(0,28,672,553)
Expand = True
{ VPanel1 VPanel
MoveScaled(1,1,94,42)
'Move(7,7,658,294)
Expand = True
AutoResize = True
{ GridView2 GridView
MoveScaled(-1,-1,94,43)
'Move(-7,-7,658,301)
Background = &HFFFFBF&
Foreground = &H404040&
ToolTip = ("Clique une propriétaire\npour voir / changer les\ndétails de celle si")
Expand = True
Scrollbar = Scroll.Vertical
AutoResize = True
}
}
{ Panel1 Panel
MoveScaled(1,44,93,34)
'Move(7,308,651,238)
{ Prenom TextBox
MoveScaled(10,0,35,3)
'Move(70,0,245,21)
Background = &HFFFFBF&
Text = ("")
}
{ Nom TextBox
MoveScaled(10,4,35,3)
'Move(70,28,245,21)
Background = &HFFFFBF&
Text = ("")
}
{ TextLabel1 TextLabel
MoveScaled(0,4,5,3)
'Move(0,28,35,21)
Text = ("Nom :")
}
{ TextLabel3 TextLabel
MoveScaled(0,8,10,3)
'Move(0,56,70,21)
Text = ("Téléphone :")
}
{ Telephone TextBox
MoveScaled(10,8,35,3)
'Move(70,56,245,21)
Background = &HFFFFBF&
Text = ("")
}
{ Fax TextBox
MoveScaled(10,12,35,3)
'Move(70,84,245,21)
Background = &HFFFFBF&
Text = ("")
}
{ TextLabel4 TextLabel
MoveScaled(0,12,10,3)
'Move(0,84,70,21)
Text = ("Fax :")
}
{ TextLabel5 TextLabel
MoveScaled(0,16,10,3)
'Move(0,112,70,21)
Text = ("Portable :")
}
{ Portable TextBox
MoveScaled(10,16,35,3)
'Move(70,112,245,21)
Background = &HFFFFBF&
Text = ("")
}
{ TextLabel2 TextLabel
MoveScaled(0,0,7,3)
'Move(0,0,49,21)
Text = ("Prenom :")
}
{ Button1 Button
MoveScaled(79,30,13,3)
'Move(553,210,91,21)
Background = &H800000&
Foreground = &HFFFFBF&
ToolTip = ("Appuyer pour quitter le programme")
Text = ("Sortir")
}
{ TextLabel6 TextLabel
MoveScaled(0,20,10,3)
'Move(0,140,70,21)
Text = ("Travail :")
}
{ Travail TextBox
MoveScaled(10,20,35,3)
'Move(70,140,245,21)
Background = &HFFFFBF&
Text = ("")
}
{ Email TextBox
MoveScaled(10,25,35,3)
'Move(70,175,245,21)
Background = &HFFFFBF&
Text = ("")
}
{ TextLabel7 TextLabel
MoveScaled(0,25,8,3)
'Move(0,175,56,21)
Text = ("E-Mail :")
}
{ Adresse TextArea
MoveScaled(57,12,36,7)
'Move(399,84,252,49)
Background = &HFFFFBF&
Text = ("")
}
{ TextLabel8 TextLabel
MoveScaled(47,12,9,3)
'Move(329,84,63,21)
Text = ("Adresse :")
}
{ TextLabel9 TextLabel
MoveScaled(47,20,8,5)
'Move(329,140,56,35)
Text = ("Code P- Ville")
}
{ TextLabel10 TextLabel
MoveScaled(47,25,10,3)
'Move(329,175,70,21)
Text = ("Pays :")
}
{ TextLabel11 TextLabel
MoveScaled(47,0,13,3)
'Move(329,0,91,21)
Text = ("Observations:")
}
{ Observations TextArea
MoveScaled(47,3,46,8)
'Move(329,21,322,56)
Background = &HFFFFBF&
Text = ("")
}
{ Code_Postal TextBox
MoveScaled(57,20,7,3)
'Move(399,140,49,21)
Background = &HFFFFBF&
Text = ("")
}
{ Ville TextBox
MoveScaled(66,20,27,3)
'Move(462,140,189,21)
Background = &HFFFFBF&
Text = ("")
}
{ Pays TextBox
MoveScaled(57,25,36,3)
'Move(399,175,252,21)
Background = &HFFFFBF&
Text = ("")
}
{ Detail Button
MoveScaled(4,30,12,3)
'Move(28,210,84,21)
Background = &H4E8036&
Foreground = &HFFFFBF&
ToolTip = ("Appuyer pour voir des\ndétails supplementaires")
Text = ("+ Détails")
}
{ Mandat Button
MoveScaled(34,30,12,3)
'Move(238,210,84,21)
Background = &H4E8036&
Foreground = &HFFFFBF&
ToolTip = ("Appuyer pour voir le(s)\nmandat(s) du \npropriétaire")
Text = ("Mandat(s)")
}
{ Delete Button
MoveScaled(64,30,12,3)
'Move(448,210,84,21)
Background = &H800000&
Foreground = &HFFFFBF&
ToolTip = ("Appuyer pour supprimer\nle client selectionné(e) ?")
Text = ("Supprimer")
}
{ Nouveau Button
MoveScaled(49,30,12,3)
'Move(343,210,84,21)
Background = &H323C80&
Foreground = &HFFFFBF&
ToolTip = ("Appuyer pour nettoyer\net entrer une nouveau\n---------Client------------\nAprès avoir remplit les\nchamps, une 2ième\nclique sauvegarde les\ndonnées !")
Text = ("Nouveau")
}
{ Chercher Button
MoveScaled(19,30,12,3)
'Move(133,210,84,21)
Background = &H4E8036&
Foreground = &HFFFFBF&
ToolTip = ("Appuyer pour chercher\nune client spécifique")
Text = ("Chercher")
}
}
}
{ Details Panel
MoveScaled(0,1,95,46)
'Move(0,7,665,322)
Visible = False
Background = &HFFFFBF&
{ Fermer Button
MoveScaled(81,41,12,3)
'Move(567,287,84,21)
Background = &H4E8036&
Foreground = &HFFFFBF&
ToolTip = ("Appuyer pour fermer \nle panneau 'détails'")
Text = ("Fermer +")
}
{ TextLabel12 TextLabel
MoveScaled(27,3,13,3)
'Move(189,21,91,21)
Text = ("Ã Ville, Pays :")
}
{ TextLabel13 TextLabel
MoveScaled(3,3,9,3)
'Move(21,21,63,21)
Text = ("Né(e) le :")
}
{ TextLabel14 TextLabel
MoveScaled(3,7,8,3)
'Move(21,49,56,21)
Text = ("Metier :")
}
{ TextLabel15 TextLabel
MoveScaled(3,11,17,3)
'Move(21,77,119,21)
Text = ("Quote-part proprio :")
}
{ TextLabel16 TextLabel
MoveScaled(27,11,3,3)
'Move(189,77,21,21)
Text = ("%")
}
{ TextLabel17 TextLabel
MoveScaled(3,15,11,3)
'Move(21,105,77,21)
Text = ("Relation :")
}
{ TextLabel18 TextLabel
MoveScaled(27,15,11,3)
'Move(189,105,77,21)
Text = ("Avec qui :")
}
{ TextLabel19 TextLabel
MoveScaled(3,19,11,3)
'Move(21,133,77,21)
Text = ("Depuis :")
}
{ TextLabel20 TextLabel
MoveScaled(27,19,15,3)
'Move(189,133,105,21)
Text = ("Ou (Ville, Pays) :")
}
{ TextLabel21 TextLabel
MoveScaled(3,23,12,3)
'Move(21,161,84,21)
Text = ("Conditions :")
}
{ TextLabel22 TextLabel
MoveScaled(75,19,5,3)
'Move(525,133,35,21)
Text = ("Noce :")
}
{ TextLabel23 TextLabel
MoveScaled(3,27,31,3)
'Move(21,189,217,21)
Text = ("Desciption Conditions / Observations")
}
{ Ne TextBox
MoveScaled(12,3,14,3)
'Move(84,21,98,21)
Background = &HFFFFBF&
Text = ("")
}
{ NeOu TextBox
MoveScaled(40,3,50,3)
'Move(280,21,350,21)
Background = &HFFFFBF&
Text = ("")
}
{ Metier TextBox
MoveScaled(12,7,78,3)
'Move(84,49,546,21)
Background = &HFFFFBF&
Text = ("")
}
{ Quote TextBox
MoveScaled(20,11,6,3)
'Move(140,77,42,21)
Background = &HFFFFBF&
Text = ("")
}
{ Mariage TextBox
MoveScaled(12,19,14,3)
'Move(84,133,98,21)
Background = &HFFFFBF&
Text = ("")
}
{ MariageOU TextBox
MoveScaled(41,19,30,3)
'Move(287,133,210,21)
Background = &HFFFFBF&
Text = ("")
}
{ Noce TextBox
MoveScaled(82,19,8,3)
'Move(574,133,56,21)
Background = &HFFFFBF&
Text = ("")
}
{ Conditions TextBox
MoveScaled(12,23,78,3)
'Move(84,161,546,21)
Background = &HFFFFBF&
Text = ("")
}
{ Conddesc TextArea
MoveScaled(3,30,75,14)
'Move(21,210,525,98)
Background = &HFFFFBF&
Text = ("")
}
{ DateChooser2 DateChooser
MoveScaled(27,18,27,16)
'Move(189,126,189,112)
Visible = False
Background = &H606060&
Foreground = Color.Foreground
ToolTip = ("Selectionnez une date")
}
{ Relation TextBox
MoveScaled(41,15,49,3)
'Move(287,105,343,21)
Background = &HFFFFBF&
Text = ("")
}
{ TypeLiaison ComboBox
MoveScaled(12,15,14,3)
'Move(84,105,98,21)
Background = &HFFFFBF&
Foreground = Color.Foreground
Text = ("ComboBox1")
List = [(""), ("Epouse"), ("Enfant"), ("Parent"), ("Paxé"), ("Famille"), ("Consort"), ("Associé"), ("Copro"), ("Divers")]
}
{ DateChooser1 DateChooser
MoveScaled(27,2,27,17)
'Move(189,14,189,119)
Visible = False
Background = &H606060&
Foreground = Color.Foreground
ToolTip = ("Selectionnez une date")
}
{ TextLabel24 TextLabel
MoveScaled(28,0,33,2)
'Move(196,0,231,14)
Font = Font["Bold"]
Text = ("........................... les détails ..........................")
}
}
{ Nombre TextLabel
MoveScaled(90,0,6,2)
'Move(630,0,42,14)
Font = Font["-1"]
ToolTip = ("Nombre des \nenregistrements")
Text = ("TextLabel25")
}
}
More information about the User
mailing list