LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Parameters and DateTime

This question is twofold, but related in a sense so I posted them together.

I am using an ODBC Microsoft SQL driver and ADO. I tried to use parameters
but ended up with a message telling me that the variables @Whatever had not
been set. I know the code was good and when I looked the error message up on
the internet, someone said that named parameters are not supported on th
ODBC Driver for Microsoft SQL and you have to use positional parameters ?
placeholders. So

1.) Is this correct about the placeholders.

2.) If so, is it the order SQL placeholders are found in the sqlString and
can you intersperse them. for instance.

INSERT INTO MYTABLE VALUES (
firstField='Hello',secondField=?,thirdField='World ',lastField=?);

In this case is it the order which I created the parameters in the command
object which dictactes which one to pick up next ?

3.) Lastly, I have the standard situation where the sever takes dates in US
format by string, someone told me that if you use parameters then you can
assign the parameter a UK format and the server will take it as a parameter
an store it in the UK Format.

Is this true ?

Thanks so much for your help !



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datetime CSV format kh[_2_] Excel Discussion (Misc queries) 1 November 13th 08 09:08 AM
Using datetime fields as parameters in a query... Olaf Stetzer Excel Programming 1 January 7th 04 02:55 PM
Date or datetime Dkso Excel Programming 1 December 2nd 03 08:25 PM
DateTime Format Joe Harriman Excel Programming 1 October 3rd 03 02:57 PM
datetime in query Ling[_2_] Excel Programming 1 August 8th 03 05:08 PM


All times are GMT +1. The time now is 08:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"