Solved

VB and Sybase

Posted on 2001-06-17
3
220 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
Comment Utility
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
Comment Utility
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
Comment Utility
I guess you can download the ODBC driver from www.sybase.com website or www.merant.com (formerly, INTERSOLV)

Thanks.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

10 Experts available now in Live!

Get 1:1 Help Now