Página 5 de 5

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 06 Dic 2016 14:46
por Nicky Rubbernubs
Thx! :D

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 27 Dic 2016 08:12
por Elmaniatiko
gracias

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 05 Ene 2017 00:53
por traveler
Obrigado

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 28 Jun 2017 09:08
por vivekhada
Re: [Video]Introducccion Mysqlite en AMS

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 30 Jul 2017 03:16
por wandersonnegocios
Gracias

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 12 Sep 2017 02:56
por oussemaTN
thnkssssssssssss

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 24 May 2018 04:28
por luasqlite
Gracias :pc:

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 29 May 2018 21:11
por mrflowers
gracias

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 04 Ago 2018 15:04
por lujanufe
gracias :yes:

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 16 Jun 2020 01:40
por CHACKAL
rafaxplayer escribió:
03 Ago 2011 21:54
Buenas compañeros , aqui os dejo este video de introduccion ala implementacion que lleva AMS de Mysqlite , usando una base de datos gratuita de [link]db4free.net[/link] y como proyecto... una agenda de contactos . espero que os sirva de mucha ayuda y cualquier cosa , ya sabéis... aquí andamos ;)

Imagen

HIDE: ON
Hidebb Message Hidden Description


Imagen

Code source del video:

On StartUp:
MySQL = luasql.mysql();
MySQLConnection, err = MySQL:connect('mysqldatabaseraf', 'rafaxplayer', 'amsspecialist', 'db4free.net', '3306');
if not MySQLConnection and err then
   Dialog.Message("error",err);
else
	Dialog.Message("Ok","conexion establecida");
end
On Show de la pagina:
MySQLCursor = MySQLConnection:execute("SELECT * From Agenda")
for i = 1, MySQLCursor:numrows() do
   local ID,Nombre = MySQLCursor:fetch();
   ListBox.AddItem("ListBox1", Nombre, ID);

end
ListBox.SelectItem("ListBox1", 1);
MySQLCursor:close()

new=false;
On Select del listBox:
local nSel = ListBox.GetSelected("ListBox1")
if nSel then
nID = ListBox.GetItemData("ListBox1",nSel[1]);

	MySQLCursor = MySQLConnection:execute("SELECT * From Agenda Where ID =".. nID .."")
	local ID,Nombre,Apellidos,Email,Telefono = MySQLCursor:fetch();
   	Input.SetText("Nombre", Nombre)
	Input.SetText("Apellidos", Apellidos)
	Input.SetText("Email", Email)
	Input.SetText("Telefono", Telefono)
	MySQLCursor:close()
end
new=false;
On Click Boton "Nuevo":
Input.SetText("Apellidos","");
Input.SetText("Email", "");
Input.SetText("Nombre", "");
Input.SetText("Telefono", "");
new = true;
On Click Boton "Guardar":
local Nombre = Input.GetText("Nombre");
local Apellidos = Input.GetText("Apellidos");
local Email = Input.GetText("Email");
local Telefono = Input.GetText("Telefono");
if Nombre ~= "" then
	if new then

		MySQLConnection:execute("INSERT INTO Agenda (ID, Nombre, Apellidos, Email, Telefono) VALUES (NULL, '"..Nombre.."', '"..Apellidos.."','"..Email.."', '"..Telefono.."')")

	else

		MySQLConnection:execute("UPDATE Agenda SET Nombre ='"..Nombre.."',Apellidos ='"..Apellidos.."',Email ='"..Email.."',Telefono ='"..Telefono.."' Where ID ="..nID)
	end
end

ListBox.DeleteItem("ListBox1",  LB_ALLITEMS);
MySQLCursor = MySQLConnection:execute("SELECT * From Agenda")
for i = 1, MySQLCursor:numrows() do
   local ID,Nombre = MySQLCursor:fetch();
    result = ListBox.AddItem("ListBox1", Nombre, ID);

end
MySQLCursor:close()

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 16 Jun 2020 06:56
por sendai
great works

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 04 Jul 2020 05:54
por Smain
muchisimas gracias

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 04 Ene 2021 06:41
por Ericxchel
Super muchas gracias

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 29 Mar 2021 16:23
por KelvynJose
me interesa aprender esto :SOS:

Re: [Video]Introducccion Mysqlite en AMS

Publicado: 13 Mar 2022 00:07
por euge2014
Thanks