Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't SELECT Date from Sqlite Database

Status
Not open for further replies.

hsingh419

Programmer
Apr 27, 2010
1
US
Hey Guys

For some reason I'm not receiving dates from a Select on a table. All the other values come over fine but not dates. I'm using a SQLite ODBC Driver to connect to my local Sqlite Database. Not doing anything fancy really. Here's the Sub if it will help.

Code:
Sub loadGatewayInstallsScript(gwSite)
 Set objConn = CreateObject("ADODB.Connection")
 objConn.Open dbConnString

 Set ObjRS = CreateObject("ADODB.Recordset")
 ObjRS.CursorType = adOpenStatic
 Objrs.LockType = adLockOptimistic
 ObjRS.CursorLocation = adUseClient
 Set objRS.ActiveConnection = objConn
 
 strQuery = "SELECT * FROM gatewayInstall WHERE accountKey=" & gwSite
 ObjRS.Open(strQuery)
 
 do until ObjRS.EOF
 for each x in ObjRS.Fields
    document.Write(x.name)
    document.Write(" = ")
    document.Write(x.value & "<br />") 
 next
  document.Write("<br />")
  ObjRS.MoveNext
 loop
 
 
 objConn.Close 
End Sub

Here's results of the query:

gatewayInstallKey = 14
accountKey = 18264
salesOrderNum = P32584
orderBooked =
installBy =
installCompleted =
salesRep = adf
installedBy = h.singh
numBedsides = 21
softwareRev = 10
onHold = True
referenceStatus = True


orderBooked, installBy, installCompleted are all Dates. Here's the same query done on the commandline.


Code:
SELECT * FROM gatewayInstall WHERE accountKey=11666;
10|11666|P382048|20010101|20020202|20030303|adf|h.singh|2384|1.5|1|0


Any help would be appreciated!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top