Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Format
Message
 
To
07/02/2002 03:50:58
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Title:
Miscellaneous
Thread ID:
00616458
Message ID:
00616510
Views:
26
>1. How can i set the sql servers environment when i make the connection
> for ex. if i want to set date format or lets say quoted_identifier off/on
> i can set it b4 executing my sqlbut it would be session specific for that
> query only, I want to set it throughout my connection.
> is it possible ??

I think that I have read something like you need to execute the command on the connection, ie:
connection.open
connection.execute "Set nocount on"
>2. can anyone suggest how to handle date insertion in sql server ?????
> for ex. if date format at sql is mdy and i waana insert 2 mar 2002.
> now my application accept dd/mm/yy so when in passes '02/03/2002' the date
> actually get inserted is 3rd feb.

Always give the date as yyyy/mm/dd to SQL and there won't be ambigous dates.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform