Xojo Prepared Statement Helper (Community Project)

Hello,

i’ve started to build a Helper App to make the process of creating prepared statements for Xojo’s various supported Database types easier.
Because i personally only use mySQL Servers, i need help from our community to finish the project. So i pushed the source to GitHub, so that you can help if you like to. :slight_smile:

Please do not comment the quality of the current code. I am no just a hobbyist programmer and i know, my code is really, really “bad”. It took a lot of courage to make the source code public.

So, if you are interested in helping you can grab the code here: https://github.com/Schneppi/Xojo-Prepared-Statement-Helper

Thank you for your help. I hope I can learn some more about the Xojo programming during this project. :slight_smile:

You can find some more information about this project in this Thread and on my Website.

The github download is missing two files: SchneppiSoftwareLogo, and mwx_logolongsmall.

Thank you for your efforts and making this public.

Fixed. Thank you Tanner. :slight_smile:

Danke Sascha, nach sowas hatte ich gesucht.

Ich habe schon ewig nicht mehr daran gearbeitet und vieles ist unvollendet.
Aber vielleicht magst Du das Projekt Forken und fortsetzen?

Meine güte eh. Ihre code sieht perfect aus (im vergleich mit meine) ;(
Gut gemacht Sascha, und danke sehr.

Zum fortsetzen habe ich zu wenig Ahnung von Prepared Statements. Ich habe gerade erst angefangen mich damit auseinander zu setzen. Dein Programm ist dabei eine groe Hilfe diese in Xojo zusammen zu bauen. Schade nur das man den Statement Typ ‘Select’ nicht auswhlen kann.

Prepared Statements sind sehr schnell erlernt und erlauben dann einen sehr übersichtlichen Code.

Das Prinzip ist sehr einfach:

[code]// Objekte Vorbereiten
Dim ps mySQLPreparedStatement
Dim rs As RecordSet

// Querrie vorbereiten
ps = Datenbank.Prepare ( "Select * FROM Tabelle WHERE Spalte=? AND Spalte LIKE ?.. ")

// Querrie Variablen mit Inhalten füllen
ps.Bind( 0, stringVariable.ConvertEncoding(Encodings.WindowsANSI) // Das Encoding muss natürlich zur Datenbank passen
ps.BindType(0, mySQLPreparedStatement.String)

// Querrie ausführen
rs = ps.sqlSelect[/code]