Figured it out. It is only in the 3.94 not in the 4.0 Package.ts-soft wrote:In the directory, you found the ASM and C subdirectory, there is PBOSL.hKonne wrote:Ain't there. There are only the dirs "ASM" and "C". Maybe someone can post it please.
PBOSL - A OpenSource Library-Collection for PureBasic
- DoubleDutch
- Addict
- Posts: 3219
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Just delete the dbin lib from your library folder and use the actual source code.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
DarkDragon wrote:PBOSL update:
- compiled for 4.20 - updated the make batch files
- ExDatabase added.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Hi, thanks for the update.
Can you please explain how the AddDSN and AddSystemDSN procedures work? I'm not sure how to specify a DSN entry name or if there are constants for the Driver.s parameter.
Sugestion: make only one command
where dsnType would be something like:
.
Can you please explain how the AddDSN and AddSystemDSN procedures work? I'm not sure how to specify a DSN entry name or if there are constants for the Driver.s parameter.
Sugestion: make only one command
Code: Select all
AddDSN(dsn.s, database.s, user.s password.s, driver.s, attributes.s, dsnType.l)
Code: Select all
#ExDatabase_DSN_User
#ExDatabase_DSN_System
Proud registered Purebasic user.
Because programming should be fun.
Because programming should be fun.
In the PBOSL_Examples Pack a examples for:
firebird, mysql, sqlite3 and mdb
Here a mdb example:
Sorry, the comments a german
firebird, mysql, sqlite3 and mdb
Here a mdb example:
Code: Select all
; Original by PAMKKKKK
; angepaßt für PBOSL_ExDatabase und PB4 by ts-soft und mk-soft
EnableExplicit
UseODBCDatabase()
;InitDatabase()
Define.s dbName = "d:\exDatabase_test.mdb" ; könnt Ihr anpassen
Define.s DSN
Define.s SQL
Define.l db = 0
Define.l result
If CreateEmptyMDB(dbName) ; leere Datenbank erstellen
DSN = AddDSN(dbName, "", "") ; DSN hinzufügen
EndIf
Debug "DSN=" + dsn
; Datenbank verbinden
If OpenDatabase(db, DSN, "", "") = 0
End
EndIf
If IsDatabase(db)
Debug "Start..."
; SQL Befehl zum Tabelle erstellen
SQL = "Create table Adress (id autoincrement, vorname text(50), nachname text(50), constraint Adress unique(id));"
If DatabaseQuery(db, SQL) ; SQL Befehl ausführen
; SQL Befehl zum einfügen von Daten in die Tabelle
SQL = "Insert into Adress (vorname, nachname) values ('Thomas', 'Schulz')"
DatabaseQuery(db, SQL) ; SQL Befehl ausführen
SQL = "Insert into Adress (vorname, nachname) values ('Max' ,'Mustermann')"
DatabaseQuery(db, SQL) ; SQL Befehl ausführen
SQL = "Insert into Adress (vorname, nachname) values ('Erika', 'Mustermann')"
DatabaseQuery(db, SQL) ; SQL Befehl ausführen
Else
Debug DatabaseError()
EndIf
; SQL Befehl zum Auslesen von Daten der Tabelle
SQL = "Select * from Adress order by nachname asc;"
If DatabaseQuery(db, SQL) ; SQL Befehl ausführen
Debug "Daten in Tabelle 'Adress'" : Debug ""
While NextDatabaseRow(db) ; gelesene Daten aus der Datenbank durchlaufen
Debug Str(GetDatabaseLong(db, 0)) + ": " + GetDatabaseString(db, 1) + " " + GetDatabaseString(db, 2) ; gelesene Daten aus der Datenbank ausgeben
Wend
EndIf
CloseDatabase(db)
EndIf
; Tabellen lesen
If ExamineTables(dsn)
Debug "Tabellen in Database:"
Debug ""
While NextTable()
Debug GetTableName() + " <-- " + GetTableType()
Wend
Debug "" : Debug ""
EndIf
result = RemoveDSN(dbName); DSN wieder entfernen
If Result = 0
MessageRequester("SQLError", GetSQLInstallerError())
EndIf
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
don't understand
AddDSN creates a entryname for you.
This should unique to your database. Normally you remove this after using.
For defined DSN you can use "OpenDatabaseRequester"
AddDSN creates a entryname for you.
This should unique to your database. Normally you remove this after using.
For defined DSN you can use "OpenDatabaseRequester"
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
I mean, in ODBC Administrator under Windows XP's administrative tools, you identify a DSN with a name. Sometimes I need that instance name to be a specific name, for application compatibility (more than one application using the same DSN).
So in my include, I inform the DSN name I want:
This is a just an example but notice that the first parameter is the DSN name. From your example a DSN name is created automatically or am I missing something?
Thanks for all your help.
So in my include, I inform the DSN name I want:
Code: Select all
ProcedureDLL MSSQL_MakeConnection(dsn.s, dsnType.l, user.s, password.s, database.s, server.s, dbNumber.l)
Thanks for all your help.
Proud registered Purebasic user.
Because programming should be fun.
Because programming should be fun.
Yesbyo wrote:From your example a DSN name is created automatically?
Code: Select all
DSN.s = AddDSN("mydb.mdb", "", "")
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
-
- Addict
- Posts: 2228
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Yes, I understand what the difference is. I guess I should be more clear in what I'm trying to do.
I'd like a service running under an administrator account. I'd like a separate program to send data/files to this service. The service then writes those files to a specific location with appropriate security settings. Mostly that other non-admins can only read and not modify the files.
I could probably accomplish this by having the service monitor a directory and pick up and handle files from that directory but that idea is not so appealing.
I'd like a service running under an administrator account. I'd like a separate program to send data/files to this service. The service then writes those files to a specific location with appropriate security settings. Mostly that other non-admins can only read and not modify the files.
I could probably accomplish this by having the service monitor a directory and pick up and handle files from that directory but that idea is not so appealing.