Skip site navigation (1) Skip section navigation (2)

From: "Peter Vanderploeg" <pvanderploeg(at)polarsec(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Date: 2001-10-10 16:19:14
Message-ID: 000001c151cd$792f8ef0$e88a9aa5@securities (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
I am having a problem with an ADO recordset where a date restriction is in
the where clause.  I am desperate for a solution to this mystery.  Here is
the code

	dim rstPr as ADODB.recordset
	dim UpLoaddate as date
	dim acctID as integer

	cnn = "ODBC;DATABASE=Sandbox;UID=Peter;PWD=;DSN=SQL server"
	UpLoaddate = #10/9/2001#

	Set rstPr = New ADODB.Recordset
	rstPr.Open "select * from tblPrices where tblPrices.Pricedate = " &
UpLoaddate, cnn, adOpenDynamic, adLockOptimistic

 I get no records even though some exist.  (UpLoaddate is a date variable in
VB and tblPrices is an SQL Server table.)

When I use the DAO object, i get the recordset I expect.

	dim rsttest as DAO.recordset
	dim UpLoaddate as date
	dim acctID as integer
	dim db as DAO.database

	UpLoaddate = #10/9/2001#

	Set db = OpenDatabase("d:\PolarTools\Sandbox.mdb")
	set rsttest = db.openrecordset("select * from tblPrices where
tblPrices.Pricedate = #" & UpLoaddate & "#", dbOpenDynaset, dbSeeChanges)

In this case tblPrices is a link in access to the tblPrices table in SQL
Server.  What's going on?  I hope you could help me.

Peter Vanderploeg


  • Re: at 2001-10-16 02:42:50 from Hiroshi Inoue

pgsql-interfaces by date

Next:From: Christof PetigDate: 2001-10-11 13:31:21
Subject: Re: libECPG: Warning: get descriptor: 7.1 and 7.2 arenot
Previous:From: Tim BarnardDate: 2001-10-10 14:49:19
Subject: Re: Trouble linking with libpq

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group