Database problem

Ton Kuypers tkuypers at dmp-int.com
Wed Jun 28 17:14:30 EDT 2006


Hi, fellow Revolutionaires...

I have a strange problem:

I'm using RR 2.7.2 Enterprise on OS X 10.4.7

I'm connecting to a SQL Server through an ODBC connection, no problem  
so far.
When I retrieve data from the SQL Server, all fields come over just  
fine, except DateTime fields...

There are 2 of these fields, each containing a value like "28-06-2006  
00:00"

When I use  the code below to get the data, the value I get for the  
date is truncated and changed to "2006-06-"...

Anyone any ideas?


Warm regards,

Ton Kuypers
Digital Media Partners bvba
Tel. +32 (0)477 / 739 530
Fax +32 (0)14 / 71 03 04
http://www.dmp-int.com


The code:

ON MouseUp
     put fGetClients() into msg
END MouseUp


FUNCTION fGetClients
     put "SELECT Contacts.CompanyNameINV, Contacts.Contact_ID FROM  
Contacts;" into vCommand
     put fGetData(vCommand) into vData
     return fDB2Field(vData)
END fGetClients

FUNCTION fGetData vCommand
     set cursor to watch
     put getConnectID() into dbID
     IF dbID is empty THEN exit to top
     put the pConnectionID of Stack "Motivation" into dbID
     IF dbID is not a number THEN
         put "Error: " & dbID into vError
         answer vError
         set the clipboardData["text"] to vError
         exit to top
     END IF  -- dbID is not a number
     return revDataFromQuery(tab,return,dbID,vCommand)
END fGetData





More information about the use-livecode mailing list