Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.

Modul: SQL.BAS

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2010, 02:45 PM
Amalkotey's Avatar
Basic4ppc Veteran
 
Join Date: Feb 2009
Location: Oberhausen, Germany
Posts: 215
Send a message via AIM to Amalkotey Send a message via Skype™ to Amalkotey
Default Modul: SQL.BAS

Hallo,

Wiederverwendbarkeit ist heutzutage ein wichtiges Thema. Aus diesem Grunde Habe ich das Modul SQL.BAS erstellt, welches ich allen registrierten Basic4PPC-Entwickler gerne zur Verfügung stellen möchte. Aus diesem Grunde habe ich in der Zip-Datei die nötigen DLL's entfernt. In dem Beispiel-Progamm SQL-Unit wird gezeigt, wie man Tabellen erstellt, Datensätze liest, speichert und löscht. Beim Löschen eines Datensatzes kann die Tabelle reorganisiert werden.

Folgende Subroutinen wurden implementiert:

Public Sub CreateConnection(DatabaseFile, Password)
Public Sub CloseConnection(DatabaseFile)
Public Sub CreateTableIfNotExists(DatabaseCreate, Password)
Public Sub CreateDataTable(DataTable, Fields, Contents)
Public Sub GetSQLParams(Info, DataTable) ' Zur Verfügung gestellt durch: berndgoedecke, Basic4PPC-Forum
Public Sub SetDatabasePassword(Password)
Public Sub GetColumnsCount(DataTable)
Public Sub GetTableCount(DataTable)
Public Sub DatabaseReorganization(DataTable)
Public Sub ReadDataRecord(DataTable, ID)
Public Sub SaveDataRecord(DataTable, Mode, ID, Fields, Contents)
Public Sub DeleteDataRecord(DataTable, ID, ReOrganisation)

Die Subroutinen sind eigentlich selbst erklärend. Den Aufruf sieht man im Demo-Programm

Mit freundlichen Grüssen

Amalkotey

--------------------------------------------------------------------------

Hi,

Reusability is an important issue nowadays. For this reason, I Have the module SQL.BAS created, which I Basic4ppc all registered developers would like to provide. For this reason I have removed the zip file the necessary DLL's. In the example shown Progam SQL-Unit, how to create tables, records, reads, saves and deletes. When you delete a record, the table can be reorganized.

The following subroutines have been implemented:

Public Sub CreateConnection (DatabaseFile, Password)
Public Sub Close Connection (DatabaseFile)
Public Sub CreateTableIfNotExists (DatabaseCreate, Password)
Public Sub CreateDataTable (DataTable, Fields, Contents)
Public Sub GetSQLParams (Info, DataTable) 'Provided by: bernd Goedecke, Basic4ppc Forum
Public Sub SetDatabasePassword (Password)
Public Sub GetColumnsCount (Data Table)
Public Sub GetTableCount (Data Table)
Public Sub DatabaseReorganization (Data Table)
Public Sub ReadDataRecord (DataTable, ID)
Public Sub SaveDataRecord (DataTable, fashion, ID, Fields, Contents)
Public Sub DeleteDataRecord (DataTable, ID, reorganization)

The subroutines are actually self-explanatory. The call you see in the demo program

Yours sincerely,
Attached Files
File Type: zip SQL-Unit.zip (7.1 KB, 184 views)
__________________
Software Developer for PC, Smartphone and PocketPC - Certified as MCP,
Cisco CCMA, OCPJP and as a Solution Consultant SAP NetWeaver 2004s BI
-----------------------------------------------------------------------
Devices: HTC Desire / ARCHOS 101 G9 250HDD / Samsung SGH-i900 Omnia
Website: www.esdaSO.de
Reply With Quote
  #2 (permalink)  
Old 06-11-2010, 01:42 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Thank you for sharing.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
using "Sender" to get control name - modul ? mike2ppc Questions (Windows Mobile) 2 12-31-2008 09:12 AM


All times are GMT. The time now is 10:46 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0