Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VB and Sybase

Posted on 2001-06-17
3
223 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most MSPs worth their salt are already offering cybersecurity to their customers. But cybersecurity as a service is wide encompassing and can mean many things.  So where are MSPs falling in this spectrum?
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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