Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send DateTime / TimeStamp fields to FierBird
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to send DateTime / TimeStamp fields to FierBird
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Firebird
Miscellaneous
Thread ID:
01269647
Message ID:
01269647
Views:
55
Hi all

I have the following SQL Pass Through, but it goes to the backend as a string rather than as a TimeStamp field
pdFromDt = DTOT(ThisForm.txtdFromDt.VALUE)

TEXT TO lcSQL TEXTMERGE NOSHOW
	SELECT 1 AS iOrder, mA.iID AS iPID, mA.iID as iGID, '<<pdFromDt>>' AS tDt,
			mA.iID AS iAcctID, CASE WHEN mA.cDrCr = 'DR' AND mA.bOpBal > 0 THEN mA.bOpBal
				ELSE CASE WHEN mA.cDrCr = 'CR' AND mA.bOpBal < 0 THEN -mA.bOpBal
				ELSE CAST(0 AS DOUBLE PRECISION) END END AS bDebit, 
			CASE WHEN mA.cDrCr = 'CR' AND mA.bOpBal > 0 THEN mA.bOpBal
				ELSE CASE WHEN mA.cDrCr = 'DR' AND mA.bOpBal < 0 THEN -mA.bOpBal
				ELSE CAST(0 AS DOUBLE PRECISION) END END AS bCredit, 'O' AS cSource
		FROM mAccounts mA
ENDTEXT


IF NOT THIS.AllRecordsSelected()
	TEXT TO lcSQL ADDITIVE TEXTMERGE NOSHOW
			WHERE mA.iID IN (SELECT ID
							FROM AccountsSelected
							WHERE TRIM(JobID) = '<<THIS.cJobID>>')
	ENDTEXT
ENDIF

MESSAGEBOX(lcSQL)
SQLPT(lcSQL, "curLedger")
SELECT curLedger
BROWSE NORM
SQLPT() is a wrapper for SQLEXEC(). I have also tried to send the datetime value using a ? but that raises and error.

Please advise.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Next
Reply
Map
View

Click here to load this message in the networking platform