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=Microsoft
Office 2003;WSID=PSIEPK000073" _
, Destination:=Range("A1"))
.CommandText = Array( _
"SELECT hotel_edart.REF_NO, hotel_edart.DEALER_ID,
hotel_edart.edart_DT, hotel_edart.EXCHANGE, hotel_edart.SEG_TYPE,
hotel_edart.CLIENT_CD, hotel_edart.SCRIP_CD, hotel_edart.TRANS_TYPE,
hotel_edart.QTY" _
, _
", hotel_edart.PRICE, hotel_edart.CREATED_DT,
hotel_edart.MODIFIED_DT, hotel_edart.AUTH_DT, hotel_edart.AUCTION_QTY,
hotel_edart.AUCTION_RATE, hotel_edart.SCRIP_NAME" & Chr(13) & "" & Chr(10) &
"FROM ET.dbo.hotel_edart hotel_TRAD" _
, _
"E" & Chr(13) & "" & Chr(10) & "WHERE (hotel_edart.edart_DT>{ts '" &
tmonth1 & " 00:00:00'}) AND (hotel_edart.SEG_TYPE='C')" & Chr(13) & "" &
Chr(10) & "ORDER BY hotel_edart.EXCHANGE, hotel_edart.SCRIP_NAME" _
)
.Name = "Query from 10.9.21"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With