access database in Kbasic

access database in Kbasic

Postby Okto » Tue 28. Apr 2015, 14:20

Hi, I am migrating from VB6 to Kbasic, usually I'm using the access database .mdb with the VB6, kindly advise how to write the following lines in Kbasic way :
' The define / declaration of database and it's tables

Dim wrkjet As Workspace
Dim dbkenari As Database
Dim rsbirds As Recordset

Set wrkjet = CreateWorkspace("", "admin", "", dbUseJet)
Set dbkenari = wrkjet.OpenDatabase("kenari.mdb")
Set rsbirds = dbkenari.OpenRecordset("birds")

and how to put the database value into variable :
for example : (Mbirdname as string)
Mbirdname = rsbirds!name

Thank you,
Okto
Okto
 
Posts: 1
Joined: Thu 5. Feb 2015, 04:17

Re: access database in Kbasic

Postby Henning » Thu 30. Apr 2015, 00:11

Hi Okto,

You can handle an acces DB using SQL. You said KBasic, but this example is for the newer Q7Basic (Basic4QT).
Hope it will give you some hints.

DatabaseExample.zip
(3.84 KiB) Downloaded 732 times


/Henning
Henning
 
Posts: 3
Joined: Wed 11. Jun 2014, 15:46


Return to Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron