Purebasic Database Usage

Share your advanced PureBasic knowledge/code with the community.
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Purebasic Database Usage

Post by Num3 »

For more explicit information on purebasic database handling, please download the purebasic odbc manual i've created at:

cosmos.oninetspeed.pt/rui_carvalho/storage/odbc.chm



EDIT:

Well has an addon, i've included also the SQLite Syntax (General SQL syntax) to help user's start on query's.
TerryHough
Enthusiast
Enthusiast
Posts: 781
Joined: Fri Apr 25, 2003 6:51 pm
Location: NC, USA
Contact:

Re: Purebasic Database Usage

Post by TerryHough »

Num3 wrote:Well has an addon, i've included also the SQLite Syntax (General SQL syntax) to help user's start on query's.
Thnks, I will review it thoroughly ASAP

The SQL Syntax gives an error. Looks like it isn't included.

Terry
User avatar
blueb
Addict
Addict
Posts: 1116
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Yes Rui,

Looks like it's hardcoded on D:/Documentos directory.

HTH,
blueb
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Purebasic Database Usage

Post by ricardo »

Excelent idea !!

But... the SQLite part was not compiled on CHM file :(

It tries to look in D:/Documentos/purebasic/sqlite etc.
ARGENTINA WORLD CHAMPION
Bernard
User
User
Posts: 23
Joined: Sun Apr 27, 2003 4:49 pm
Location: France

Post by Bernard »

Does anyone have some examples of use MSADO15.DLL

Thanks
Bernard
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Ok, just edited the CHM, everything should be working fine now!

Please download it on the link above...
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

DNS less connection

Post by Blade »

What if I want to make a DNS-less connection? (providing directly the DB filename) :?:
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

In Windows I don't think you can use ODBC without a DSN...
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Karbon wrote:In Windows I don't think you can use ODBC without a DSN...
Well, I do it with ASP, and my collegues say that can be easily done in VB, so I wonder if PB consider this option.

It's very useful, because no DNS has to be configured by the user or application.
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Oh, cool.. I didn't know it was possible.. How do you do it in VB and maybe we can get a feel as to how it might be done in VB?

Note that I'm far from an ODBC/Windows database guru but I'll help if I can :-)

And are you talking about DSN or DNS? DSN being Data Source Name and DNS being Domain Name System.. I used to mis-type that acronym a lot but wanted to make sure we're talking about the same thing!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Karbon wrote:Oh, cool.. I didn't know it was possible.. How do you do it in VB and maybe we can get a feel as to how it might be done in VB?

Note that I'm far from an ODBC/Windows database guru but I'll help if I can :-)

And are you talking about DSN or DNS? DSN being Data Source Name and DNS being Domain Name System.. I used to mis-type that acronym a lot but wanted to make sure we're talking about the same thing!
I always mis-type and mis-spell it too! :wink:
I'm talking abot Data Source Name, the one useful for databases.

In these days my collegues are in holiday, so no VB advices...
With ASP (VBscript, in some ways similar to VB) I do so to use an Access2000 DB:

Code: Select all

SQLQuery="select * from table"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open SQLQuery,"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\filename.mdb",adOpenStatic,adLockPessimistic
id=rs("ID")
Sorry, haven't enought experience with other languages+database
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

Ahh, you're using ADO there (not ODBC). I'd like to know how one could use ADO in PureBasic but I think it involves COM and some other stuff so I'm sure it's complicated if even possible.

I posted something in Tips And Tricks about how to create a DSN in PB code. Take a look - maybe that's what you want to do?
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
User avatar
the.weavster
Addict
Addict
Posts: 1577
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

OCELOT SQL DBMS

Post by the.weavster »

Has anybody tried this?
http://www.ocelot.ca/

(Preferably someone clever who can figure out how it works and then tell me) :?
ShDancer
User
User
Posts: 51
Joined: Sat Apr 26, 2003 5:49 am

Re: OCELOT SQL DBMS

Post by ShDancer »

Very nice work.
There is a little problem with the images they are in Portuguese.

(O que e bue de chato) - > ( It's a pain in the Axx ) :?

So can you try to implement that in english?

But it is an excelent ideia.

keep the goot work. :)
User avatar
oryaaaaa
Addict
Addict
Posts: 825
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Post by oryaaaaa »

Thanks
Post Reply