Re: CADORecordBinding ... adDate

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



beginthreadex (beginthreadex@xxxxxxxxxxx) writes:
> I am using RecordBinding from VC++ successfully against a SQL server
> 2000 database. My issues revolve around getting datetimes from SQL into
> anything readable in VC++ as a date/double/ULARGE??? variable. Right now
> I can put this data into a double but the data is not able to be parsed.
> There does not seem to be a clean conversion from double to a FILETIME
> or other struct.
>
> How can I use CADORecordBinding and get a "getdate()" value from SQL
> without converting to a varchar(x)?
>
> The sample in MSDN states using a DBDATE variable, but there's no success
> with this. It also states that you should use ADO_FIXED in one sample and
> then another is ADO_VARIABLE ... so I'm really confused and would really
> welcome a solution at this point.

The type indicator to use in OLE DB is DBTYPE_DBTIMESTAMP. Really how
that translates when you drag in ADO, I don't know, as I have not
worked with ADO from C++.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Access 2007->SQL Server2005 "connection was forcibly closed",G
    ... I moved every table I was able to move to the SQL ... closed connections - but all of these errors are in the version which used ... the SQL Server 2000 and everything worked ... communication between ODBC (OLEDB and Native Client, ...
    (microsoft.public.sqlserver.connect)
  • Re: Smartest way toa add records manually
    ... class modules to represent tables, collections, etc., and started isolating ... we've transitioned from Access as a back end to SQL Server as ... Then I discovered why I transitioned to ADO. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Unable to Apply SP4 to SQL 2000 Cluster (new Node)
    ... Rebuild the node in the failover cluster. ... Scenario 1" in SQL Server 2000 Books Online. ... This setup process updates to SP4 only the binaries on the new ...
    (microsoft.public.sqlserver.clustering)
  • Re: WSS 3.0 question
    ... I followed the advise given in removing WSS 3.0 etc, ... the server is complaining that the SQL service(?) was tempered with or corrupt. ... I may just instal the SQL server as I was going eventuall use it anyway. ... If WSUS 3.0 is installed, I would suggest you uninstall it and then you install WSS 3.0. ...
    (microsoft.public.windows.server.sbs)
  • Re: Connection to MS-SQL Server (question of which objects to use)...
    ... Example for ADO: ... SQL DMO is only for SQL Server 2000. ... Set objSQLserver = CreateObject ...
    (microsoft.public.scripting.vbscript)