Sybase (SAP) Advantage Database
With VB.NET Desktop application development
![]() |
🍀Key Features
⬇️Project Scenario/idea
- Create New Visual Basic 2022 WinForms Application Project
- Path to Project (I.e. D:\MySyBase\)
- Path to Database (I.e. D:\MySyBase\Bin\Debug\)
- Sybase Advantage Database (MyDB.add)
- Sybase Advantage Database Username : AdsSys - Password : ahmed
- Sybase Advantage Database Table (I.e. MyInfo.adt)
Visual Basic 2010 - Sybase Advantage Database |
Visual Basic Form Design :
Update for Visual Studio 2015 : Download Advantage Data Provider 11.10.30
The installation file dataprovider.exe, installs :
- Advantage CA-Clipper RDDs
- Advantage CA-Visual Objects RDDs
- Advantage Client Engine API
- Advantage Crystal Reports Driver
- Advantage Data Architect
- Advantage JDBC Driver
- Advantage .NET Data Provider
- Advantage ODBC Driver
- Advantage OLE DB Provider (for ADO)
- Advantage TDataSet Descendant
- Advantage Delphi Components
- Advantage Web Platform
- Advantage Python Interface
- Advantage Rudy Interface
- Advantage Perl DBI Driver
- Advantage PHP Extension
Visual Basic 2010 - Add Reference to Sybase Advantage Database |
The Codes
Module1
Form1
Sub ClearAll()
Note : You will need 2 Pictures PNG [On : Off] to refer to the Database Status, path [..Bin/Debug].
Another Lesson : How to Remote Database using XML :
1) Create an XML file in path [.\bin\Debug\] Folder and call it [XmlFile.xml]2) Open [XmlFile.xml] with NotePad.exe and paste the following code into it :
3) Save the Xml file.
4) Open our VB 2010 Project and add a ToolStrip to the Form1, Dock = Buttom
ToolStrip VB 2010 Xml Database Update |
6) DB_Version table structure :
Update Advantage Database [MyDB.Add] using XML and Visual Basic 2010 |
Note : UpdateDT column is Date DataType.
7) Now each time you send updates to XML file, the user Checks for update and choose the XML file from Open Dialog Box and it compares the Date and Version of the Update, if New then it executes the Sql Statement line, if not, then it gives message [MsgTxt.Text] You're Up-To-Date.
8) Download Example from MediaFire.com [Testing.ZIP]
AdsConnection GetSchema tip :
How to retrieve Advantage Data Dictionary Schema in VB 2010.Advantage Data Types conversion in VB 2010 |
Type | Length | Available in DBF Table | VB 2010 Value |
Character
|
1 to 65530
|
Yes
|
4
|
CICharacter
|
1 to 65530
|
No
|
20
|
Date
|
4
|
Yes
|
3
|
Logical
|
1
|
Yes
|
1
|
Memo
|
9
|
Yes
|
5
|
Double
|
8
|
VFP, Extended
|
10
|
Integer
|
4
|
VFP, Extended
|
11
|
Numeric
|
2 to 32
|
Yes
|
2
|
Image
|
9
|
Extended
|
7
|
Binary
|
9
|
Extended
|
6
|
ShortInteger
|
2
|
No
|
12
|
Time
|
4
|
No
|
13
|
TimeStamp
|
8
|
No
|
14
|
AutoIncrement
|
4
|
No
|
15
|
Raw
|
1 to 65530
|
No
|
16
|
CurDouble
|
8
|
No
|
17
|
Money
|
8
|
No
|
18
|
ModTime
|
8
|
No
|
22
|
RowVersion
|
8
|
No
|
21
|
Best Use, For example :
So, in order to retrieve Field_Type or DataType of a certain column in Advantage Database, you may use this code:
Some Exceptions and Errors noticed :
Error :
Table doesn't appear in the Data Dictionary [ARC.exe] but though it appears in the Data Dictionary Folder.
Description :
When you try to create a free Table [ADT Table] using Sql Statement from VB 2010 like this. The result will be a free Table but not included in the Data Dictionary, but you will only see it in the Folder contains the Database.
Cause :
The User Id section in the connectionString is Empty, but if you tried to create another table with the same name you will get an Error specifying that ISAM found a table with the same name "Table already exists" though it doesn't appear in the Data Dictionary.
Solution :
Provider a User ID or a User Id and Password if possible in the connectionString Whether you are using OleDBConnection or AdsConnection to work with this Data Dictionary.
♥ Here are some online Visual Basic lessons and courses: