![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Aug 2005
Posts: 1
Rep Power: 0
![]() |
Set a connection to database in TService
Anybody help!!!!!!!!!!!!!
Could anybody exactly explain to me How to create connection to database through ADO or BDE in TServiceApplication or at least how to execute a query to database with TQuery or TADOQuery. Don't say that it's only necessesary to execute a procedure CoInitialize(): it doesn't work. If it's possible, show me the code. Thanks in advance. |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Jun 2005
Posts: 86
Rep Power: 4
![]() |
It's been a while since I did this, but can't you simply do this:
TDatabase dbConn; dbConn = TDatabase.Create; dbConn.Alias := 'Aliasname'; dbConn.DatabaseName := 'dbname'; // Set rest of properties. dbConn.Connected := true; |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|