Databound example (for beginners)

Hi,
if you are using MySQL you will need to import a library (such as PyMySQL - there are others but I use that one). It may not be available by default but on a pro account the Anvil guys will load it for you (they once described it as an email pip service).

In a server module you would then do something like this :

import pymysql.cursors
...
connection=pymysql.connect(
      host="ip.of.server",
      user="username",
      password="password",
      port=3306, # 3306 is standard & default so you can omit this.
      db="my_database",
      cursorclass=pymysql.cursors.DictCursor
    )

with connection.cursor() as cursor:
    connection.execute("SELECT * FROM mytable")
    result = connection.fetchall()
    print(result) # python 3 print syntax

This is just example code with no error checking, etc., but hopefully it will help you connected to a MySQL server.

Moving up and down the records is not quite the same as EWB (I used to use that as well). You would need to either manually step through the resulting data array “result”, updating your controls as required, or check out the recently added form data binding feature - I reckon that might work (though I’ve not tried it myself).