Solved

VB and Sybase

Posted on 2001-06-17
3
221 Views
Last Modified: 2012-06-21
Folks, I know the points are low but that is all I have and I need help.

I have sybase 11.03 and Visual basic 6. I want to write a program in VB that connects to the Sybase database using ODBC. When I tried to set an ODBC data source there is ODBC driver for the Sybase listed. How can I identify the ODBC driver for Sybase 11 to set the data souce.
Can I directly connect the database without using ODBC data source.
I have little knowldege of Sybase I read the following statement from the net but I don't know what it means.

"Configure Sybase on your PC. Make sure you have an entry in your SYBASE.INI file for your sybase server. "

Thank you
0
Comment
Question by:yassin092898
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
amitpagarwal earned 85 total points
ID: 6200878
Listening .. see if the code below offers some help...

u need to set up a data source by adding a Sybase System 11 driver.

Thanks,
Amit Agarwal.

   Dim db As Database
   Dim wksp As Workspace

   connstr = "ODBC;DATABASE=" & dbname & ";UID=" & Text2.Text & ";PWD=" & Text3.Text & ";DSN=gsdb"
   Set wksp = CreateWorkspace("ODBCWorkspace", "", "", dbUseODBC)
   Set db = wksp.OpenDatabase("gsdb", dbNoDriverPrompt, , connstr)

   Dim rec As Recordset
   Set rec = db.OpenRecordset("select name from sysobjects where type='U' or type='V' order by name")

   While Not rec.EOF
       Box1.AddItem (rec.Fields(0).Value)
       rec.MoveNext
   Wend
   
   rec.Close
   db.Close
   wksp.Close
0
 

Author Comment

by:yassin092898
ID: 6202109
How can I set the Sybase driver when none is listed in the ODBC listing. What is the Sybase 11 driver dll name and how Can I install it to appear in the ODBC driver listing.

Thank you.
0
 
LVL 5

Expert Comment

by:amitpagarwal
ID: 6202451
I guess you can download the ODBC driver from www.sybase.com website or www.merant.com (formerly, INTERSOLV)

Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SyBase SQL Querry Syntax 1 249
Sybase IQ how to log personalized Users? 1 201
MSSQL Error: 9002, Severity: 17, State: 2. MSQLSERVER Process shuts off 9 452
Sybase Adaptive server 4 138
Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now