Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Vijay,
The following is my code, can you suggest where I should enter Password in this code. Thank you With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DRIVER=SQL Server;SERVER=10.9.21.753;UID=yajivk;;APP=Microsof t Office 2003;WSID=PSIEPK000073" _ , Destination:=Range("A1")) .CommandText = Array( _ Add the password 'mypw' like this... With ActiveSheet.QueryTables.Add(Connection:= _ "ODBC;DRIVER=SQL Server;SERVER=10.9.21.753;UID=yajivk;PWD=mypw;APP= Microsoft Office 2003;WSID=PSIEPK000073" _ , Destination:=Range("A1")) Be careful how you deploy this, the password is stored in code, and Excel VBA code is not secure. I would at least password protect the code, but remember that it is easy to crack protectedVBA code. Should be ok if the Excel workbook is kept on a secure folder. Ed Ferrero www.edferrero.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Import New Database Query (Union Query) in Spreadsheet | Excel Discussion (Misc queries) | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |