Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
wisa64
Starting Member
1 Post |
Posted - 2005-10-05 : 17:08:29
|
| I am trying to get a DTS package to work w/ an ActiveX box to prompt user for a Date. I am pulling data out of a table into an Excel spreadsheet. The date keyed by user gets passed into parameter ? in query. I have assigned a global variable to package also. The DTS package executes fine but no row appear in the Excel spreadsheet. I'm guessing that the date keyed in input box does not match date from database for some reason. I have tried multiple ways of inputing date in input box and have tried different case/convert statements in query. I know the dates are there because I can hard code in the date as '2005-10-03' and it works. Just can't get it work by feeding in user input into where clause. Does anyone know what I'm missing.I have a much more complex query but here's the simple one I'm using just to try to get it to work. select consumerid, convert(char(10),servicedatefrom, 101) 'Date of Service', convert(char(10),updatedate, 101) 'Update Date'from tbl_cs_sv_servicewhere convert(char(10),updatedate, 101) = ?Here's the ActiveX script to prompt user for date input'**********************************************************************' Visual Basic ActiveX Script'************************************************************************Function Main()dim tamdatetamdate = inputbox ("Enter Date")msgbox ("You entered: " & tamdate)Main = DTSStepScriptResult_ExecuteTaskEnd FunctionAny advice would be wonderful as I'm pulling my hair out at this point. Thanks much......wisa64 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|