Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' Gambas module file
- Private hconn As Connection
- Public Function ConectarBase() As Connection
- hconn = New Connection
- hconn.host = User.home &/ ".ejemploBD"
- hconn.name = "DatosEjemplos"
- hconn.type = "sqlite3"
- Try hconn.Open()
- If Error Then
- Message.Info("Error al conectarse a la base de datos")
- Print Error.Text
- Print Error.Where
- Print Error.Code
- Else
- Return hconn
- Endif
- Return Null
- End
- Public Function copiarBase()
- If Exist(User.home &/ ".ejemploBD/DatosEjemplos") Then
- 'existe el archivo, no hago nada.
- Else
- Try Mkdir User.home &/ ".ejemploBD"
- Try Copy "DatosEjemplos" To User.home &/ ".ejemploBD/DatosEjemplos"
- Endif
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement