Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

query information from sybase table

Posted on 2002-07-23
2
Medium Priority
?
188 Views
Last Modified: 2011-09-20
I am wanting to know what people would recomend as the best way to query some information from a table on a Sybase database via an ODBC connection through Delphi6.
I have tried using ADO and was able to connect and view all available tables,their index's and display the data through a DBgrid but couldnt quite figure out how to extract some info based on a search e.g search the matter table for the value of fields called 'client' and 'DOB' for matter number 1. I know this could basically be put into a SQL like
"select ('client','DOB') from matter where matter number = 1"
but I am pretty confused with the ADOquery object and its strings?
Could someone suggest what they would consider the best method to bring this information back to some local variable so I could then use them in my program.
The situation would be that my application would need to run these queries from several points around their WAN from the server holding the Sybase database and each of these query points will already have the ODBC driver set-up and functional. Actuall sample code would really be appreciated as would general comments on some pros and cons of the different methods.

Thank for any ideas

Dave
0
Comment
Question by:monitorwa
[X]
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
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 800 total points
ID: 7171190
your statement should be like

select client, DOB from matter where matter number = 1

supply your daoquery with this

if you need the values in vars, then use

adoquery1.open;
clientvar := adoquery1.fieldbyname('client'),asstring;
dobvar := adoquery1.fieldbyname('DOB'),asstring;
adoquery1.close;

hope this helps

meikl ;-)

btw. what different methods?
0
 

Author Comment

by:monitorwa
ID: 7176569
thanks meikl
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

597 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