Acceder à une BDD MySQL Free depuis un programme purebasic
ça ne devrait plus tarder, mais la bêta est dispo sur ton compte et fonctionne très bien. Au pire la 4.02 est aussi dispo sur le compte et fonctionne tout de même mieux que la 3.94.
http://purebasic.developpez.com/
Je ne réponds à aucune question technique en PV, utilisez le forum, il est fait pour ça, et la réponse peut profiter à tous.
Je ne réponds à aucune question technique en PV, utilisez le forum, il est fait pour ça, et la réponse peut profiter à tous.
-
- Messages : 1500
- Inscription : jeu. 25/mars/2004 11:23
- Localisation : Sophia Antipolis (Nice)
- Contact :
La 4 est stable. Moi aussi j'ai fait de la résistance pendant longtemps, mais la nouvelle est quand même bien plus pratique !Ar-S a écrit :La 4.10 est finalisée ?![]()
![]()
@Kayne. La lib ne doit marcher qu'avec la v4.
Voici le code pour importer les fonctions de la DLL (v3.9x) :
Code : Tout sélectionner
;{ Structure }
Structure ETNA
SetServer.l
SetDelimiter.l
SetKey.l
SetKeySend.l
SetKeyReceive.l
Update.l
Send.l
NbOfQueuedCmd.l
Cancel.l
Receive.l
GetState.l
GetResult.l
GetNbOfLines.l
EndStructure
;}
;{ Globals }
Global ETNA_Info.ETNA
Global ETNA_hLib
;}
Procedure ETNA_Init( _dllFile.s )
ETNA_hLib = OpenLibrary(#PB_Any, _dllFile)
If ETNA_hLib
ETNA_Info\SetServer = IsFunction(ETNA_hLib, "ETNA_SetServer")
ETNA_Info\SetDelimiter = IsFunction(ETNA_hLib, "ETNA_SetDelimiter")
ETNA_Info\SetKey = IsFunction(ETNA_hLib, "ETNA_SetKey")
ETNA_Info\SetKeySend = IsFunction(ETNA_hLib, "ETNA_SetKeySend")
ETNA_Info\SetKeyReceive = IsFunction(ETNA_hLib, "ETNA_SetKeyReceive")
ETNA_Info\Update = IsFunction(ETNA_hLib, "ETNA_Update")
ETNA_Info\Send = IsFunction(ETNA_hLib, "ETNA__Send")
ETNA_Info\NbOfQueuedCmd = IsFunction(ETNA_hLib, "ETNA_GetNumberOfCommandsInQueue")
ETNA_Info\Cancel = IsFunction(ETNA_hLib, "ETNA_Cancel")
ETNA_Info\Receive = IsFunction(ETNA_hLib, "ETNA_Receive")
ETNA_Info\GetState = IsFunction(ETNA_hLib, "ETNA_GetState")
ETNA_Info\GetResult = IsFunction(ETNA_hLib, "ETNA__GetResult")
ETNA_Info\GetNbOfLines = IsFunction(ETNA_hLib, "ETNA_GetNbOfLines")
ProcedureReturn ETNA_hLib
Else
MessageRequester("Lib ETNA", "Lib ETNA introuvable !", #MB_ICONERROR)
EndIf
EndProcedure
Procedure ETNA_SetServer( _url.s )
CallFunctionFast(ETNA_Info\SetServer , _url)
EndProcedure
Procedure ETNA_Send( _key.l, _page.s )
CallFunctionFast(ETNA_Info\Send , _key, _page, #False, #False)
EndProcedure
Procedure ETNA_SendCrypted( _key.l, _page.s )
CallFunctionFast(ETNA_Info\Send , _key, _page, #True, #False)
EndProcedure
Procedure ETNA_GetNumberOfCommandsInQueue()
ProcedureReturn CallFunctionFast(ETNA_Info\NbOfQueuedCmd)
EndProcedure
Procedure ETNA_Update()
CallFunctionFast(ETNA_Info\Update)
EndProcedure
Procedure ETNA_Receive( _id.l )
ProcedureReturn CallFunctionFast(ETNA_Info\Receive, _id )
EndProcedure
Procedure ETNA_GetState()
ProcedureReturn CallFunctionFast(ETNA_Info\GetState)
EndProcedure
Procedure.s ETNA_GetResult()
ProcedureReturn PeekS(CallFunctionFast(ETNA_Info\GetResult, -1))
EndProcedure
Procedure.s ETNA_GetRowResult( _index.l )
ProcedureReturn PeekS(CallFunctionFast(ETNA_Info\GetResult, _index))
EndProcedure
Procedure ETNA_GetNbOfLines()
ProcedureReturn CallFunctionFast(ETNA_Info\GetNbOfLines)
EndProcedure
Procedure ETNA_Finish()
CloseLibrary(ETNA_hLib)
EndProcedure
Lio

Webmestre de Basic-univers
Participez à son extension: ajouter vos programmes et partagez vos codes !
Participez à son extension: ajouter vos programmes et partagez vos codes !