Hide LoginPrompt for Table1

Hide LoginPrompt for Table1

Post by keit » Fri, 02 Jun 2006 11:55:20



Hide LoginPrompt for Table1

Hi, I use TTable to connect to SQL Server, an alias has been
created linked to a database in the sql server, my problem is that whenever
open the table, there was a loginprompt, how to hide it? I searched a code
like:
table1.database.loginprompt := false;
but this will cause an access violation error.

how to solve this? hope you could help me out!

THANK YOU IN ADVANCE.





--
Env: SQL SERVER + Delphi 7 + ADO
 
 
 

Hide LoginPrompt for Table1

Post by Steve Trox » Fri, 02 Jun 2006 14:21:48


Use a TDatabase component, assign your alias to TDatabase.Alias, make up
an arbitrary name for the DatabaseName property, and that arbitrary name
to TTable.DatabaseName. In the TDatabase component there is a
LoginPrompt property you can set to false.


Steve Troxell

 
 
 

Hide LoginPrompt for Table1

Post by keit » Fri, 02 Jun 2006 17:08:33

thanks, it works fine

thanks again

--
Env: SQL SERVER + Delphi 7 + ADO
"Steve Troxell" < XXXX@XXXXX.COM >
??????:447e7962$ XXXX@XXXXX.COM ...
 
 
 

Hide LoginPrompt for Table1

Post by Kevin Frev » Fri, 02 Jun 2006 23:12:43

keith,

And don't use TTables (or in general, table based components) against
MSSQL.

http://www.yqcomputer.com/ ,1410,28160,00.html
http://www.yqcomputer.com/
http://www.yqcomputer.com/

Also, if possible, avoid using the BDE against MSSQL 7 and above...

http://www.yqcomputer.com/ ,1410,28688,00.html
http://www.yqcomputer.com/ ,1410,10359,00.html
http://www.yqcomputer.com/ ,1410,19694,00.html
http://www.yqcomputer.com/ ;en-us;260817

Use ADO instead

Once you are up to speed with ADO..
http://www.yqcomputer.com/ ,1410,27790,00.html

Good luck,
krf
 
 
 

Hide LoginPrompt for Table1

Post by keit » Sat, 03 Jun 2006 09:51:08

THANK YOU VERY MUCH.

--
Env: SQL SERVER + Delphi 7 + ADO
"Kevin Frevert" < XXXX@XXXXX.COM > :447ef5da$ XXXX@XXXXX.COM ...