Using SQL in delph _without_ BDE

Hi there

For several reasons, I don't have the opportunity to use BDE. More than that, the less i have to install extra (of database engines), the better. Some have told me that I could just connect directly to ODBC, and then use SQL queries there. I have made some attempts to that, and couldn't make it work.

My questions is:

1)
How do I register a database with the ODBC and connect to it, using only code in delphi?

2)
Since I will have MS-SQL on the server, how can all the clients connect to that? ODBC as well??

3)
Will ODBC/MS-SQL mean something to the syntax I should use in my queries??

If you know the answers to some of these questions, i would be very grateful. Short examples of code would be appreciated as well :-)

Yours sincerely

  Kim Nørby Andersen

QuaLjynAsked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
hi kim,

general:
for none using the bde, you must have a bde-replacement.

look for this at
http://www.kylecordes.com/bag/list.html

if you have the d5-enterprise-edition then you can easy use the shipped ado-components.

to 1:
odbc is the badest solution for connecting and i don't know how to use it without bde, get an replacement

to 2:
install the database clientsoftware for connectivity

to 3:
depending on your querys it could be that some must be translated into jet-sql


meikl ;-)
0
 
RBertoraCommented:
Yes what Kretschmar says is true, unless you use a replacement you have to use the BDE.

If i were you I would use the BDE.
You can connect to the database using ODBC driver or Native Driver, but it all goes through the BDE.

Rob ;-)
0
 
QuaLjynAuthor Commented:
Could a replacement be MS - SQL server??
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
kretzschmarCommented:
nope,
MS - SQL server is a database-server and not a bde-replacement, look at my given link and examine, which bde-replacement supports MS - SQL server.
meikl ;-)
0
 
kretzschmarCommented:
hello?
0
 
QuaLjynAuthor Commented:
Sorry Meikl

I tried to look at your page, and sort of delayed the problem... that's why i forgot about this. I'm a bit sad that i cannot connect directly to ODBC and then continue with windows standard stuff of some kind. Well, I guess I'll just have to live with it, and start dabbling with ADO :)

Thanks for the answer anyways, as always it was great in quality...

Yours

  Kim
0
 
QuaLjynAuthor Commented:
Look at my last comment :)
0
 
kretzschmarCommented:
thanks, kim,
and good luck by dabbling with ADO

meikl ;-)
0
All Courses

From novice to tech pro — start learning today.