Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Michael$Lost wrote: I'm trying to hit a stored procedure in SQL but I'm getting an error when I'm passing anything that needs the quotes " " for SQL. How do I pass the quotes in a variable? I'm sure it's amazingly simple but I'm lost. objCmd(1) = "10/25/2000" Instead of double quotes Chr$(34), try single quotes Chr$(39), which is ANSI standard syntax. BTW if your column is a temporal data type (e.g. DATETIME), try using an unambiguous date format e.g. objCmd(1) = Chr$(39) & "2000-10-25" & Chr$(39) Note your product may have a different 'date delimiter' e.g. MS Access uses the hash character Chr$(39). Jamie. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Linking computer dates (time) to spreadsheet dates that have formu | Excel Worksheet Functions | |||
compare 2 tables of dates to find the preceding dates | Excel Worksheet Functions | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
Identifying unique dates in a range of cells containing dates... | Excel Discussion (Misc queries) | |||
Identifying unique dates within a range of cells containing dates | Excel Discussion (Misc queries) |