Greetings:
I'm trying to figure out how to Select a record from an Access 2002 database with SQL by identifying from the date field (rDate), the first date that exists prior to today's date.
Has anyone dealt with this that could steer me in the right direction?
I'm having a problem updating my Access 2002 db using an ASP variable whose value is provided from a form text box.
If I simply use the following, the db is updated correctly with the number 5.
Set conn = server.createobject("adodb.connection")
conn.connectionstring = "DRIVER={Microsoft Access...
I am running the following in an ASP page and it works perfectly:
<%
dim Rdate
dim PrevRdate
Set conn = server.createobject("adodb.connection")
conn.connectionstring = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\tradersreportsdata\reportevents.mdb;pwd=matrix"
conn.Open
Set...
Pete:
That works beautifully. I really appreciate the help.
One more question if I may. Is it more efficient for me to use '*' or to specify only the fields from which I need the data?
Warren
Sorry, I didn't know that Date was a function. I'll rename the field _Date in the database. Meanwhile, I tried your suggestion and got:
[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does not include the specified expression 'Name' as part of an aggregate function
Here's what I'm using:
SELECT Name,Date FROM reports WHERE ((4/17/2006) Is Not Null) GROUP BY Format(4/17/2006,'yyyy-ww'), 4/17/2006 HAVING (((Format(4/17/2006,'yyyy-ww'))=Format(Date(),'yyyy-ww')));
It returns:
[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that does...
Unfortunately that returns an error as follows:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Cannot group on fields selected with '*'.
/weekinreview.asp, line 118
I'm trying to write an SQL query that identifies today's date, and then provides the date range for that date's week, so I can return all my database records that fall in that week's date range and display them in my ASP page.
Is there a way to do this?
Regards
I'm trying to write an SQL query that identifies today's date, and then provides the date range for that date's week, so I can return all my database records that fall in that week's date range.
Is there a way to do this?
Regards
I am trying to query an Access 2002 database from my asp page and have the data in the 'Time' field displayed in the custom format that I designated when I built the Access table. I am using the following format in Access: h:nnam/pm to return 8:30am.
When I query the 'Time' field from my page...
If I use the code you showed i get the following:
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/createreportfile.asp, line 1691
ReportFile.WriteLine("<%@ LANGUAGE=" & Chr(34) & "VBSCRIPT" & Chr(34) & "
Greetings
I am trying to write a string to a file using the following:
dim ReportObject,ReportFile
set ReportObject=Server.CreateObject("Scripting.FileSystemObject")
set ReportFile=ReportObject.CreateTextFile(Server.MapPath("\reports\reportfile.asp"))
ReportFile.WriteLine("<%@...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.