views:

200

answers:

2

Connecting to ADO is hard from installation in Delphi, so I decided to use VBscript, which I have never used before. VBscript has little support in Delphi, so how do I run a Windows script editor to get support and carry it over to Delphi? I do not understand the statements in VB script very well yet

  1. My Delphi TTable is connecting to the ADO
  2. I need to connect to a Microsoft DB file in c:\program files\common\my folder\my file
  3. I need to disconnect the ADO to relocate this file and place a new copy in its place periodically.

I looked up the MSN web site and it's not that helpful. I see scripts that could be useful for many things if I can get them working.

Can anyone help please?

Lex Dean

+2  A: 
  • You do not connect to ADO. You connect to a DB through ADO. ADO is a technology to connect to different databases using a common API - the database native API is taken care of by ADO drivers.
  • You say you need to connect to a "Microsoft DB" file but do not specify what kind. ADO can connect directly to Access files, but if you use SQL Server you never connect to a file, you connect to the database server.
  • Delphi has a different set of components to connect through ADO. They are the TADOxxxx component. TTable is built upon the BDE, and can't use ADO. Use TADODataset or TADOTable.
  • Using VBScript from Delphi is possible, but would not solve your problem easily - you will have to pass ADO objects to and from Delphi and VBScript, and it requires a good knowledge of Delphi, Windows, COM and so on. If you need to use ADO, take the straight path.
ldsandon
+2  A: 

Hello, The best way is to use the native (and easy) ADO components in Delphi.

You will found a example of 'how to do', with source, here : http://sourceforge.net/projects/axbase/

philnext