Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing date to SQL Server smalldatetime
Message
 
 
To
20/05/2002 18:11:14
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00659154
Message ID:
00659158
Views:
25
cSQL = [exec sp_create_translator '] + DTOS(dSchoolYear) + [']
>Hello group.
>
>I am sending a date to the SQL Server which when I run select getdate() returns
>
>---------------------------
>2002-05-20 17:38:07.763
>
>(1 row(s) affected)
>
>The field I am sending a date to is of type smalldatetime.
>The field from the foxpro table I am using to hold the date, is of type date, the field name is SchoolYear and contains i..e. 06/15/02 in a date field
>
>Scattertable table name
>ldSchoolYear = SchoolYear
>which is passed on to a procedure
>
>PROCEDURE Create_Table(cServerName,cDatabaseName, dSchoolYear)
>
>LOCAL lnHandle
>
>cSQL = 'exec sp_create_translator dSchoolYear'
>
>*!* Runs a form that connects to server and returns connection handle.
>DO FORM frmlogin WITH cServerName, cDatabaseName TO lnHandle
>
>SqlExec(lnHandle,cSQL) && execute the create translator program
>
>
>cSQL = 'exec sp_create_temp_tables' && create the temporary tables
>
>SQLDISCONNECT(lnHandle)
>
>
>ENDPROC && Create_Table
>
>doesn't work. How do I successfully send the date from foxpro to SQL Server?
>
>Thanks
>Jim
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform