I don't know a lot about ASP and I know even less about SQL. I have been trying to search the web for information to be able to get done what I need. I've tried piecing things together from many different sites, adding my own info in where needed, but it just isn't working.
What I want to do is, using an existing database setup for a calendar application, pull information out of the database and display a title of an entry that corresponds with the current date.
if you go to the address above, you will see that there is a sign graphic which has text over it that says an ice cream flavor. Right now I am using AJAX scripting to display a different HTML file for each day of the month, because the Flavor of the day changes every day. I want to pull the flavor of the day from the calendar, since the manager will have the flavors of the day in the calendar as events.
here's what i've got in a test file.
I had this setup to test if I could even pull data from the database, to no avail:
Apparently I've done something wrong, but I have no idea what. I don't understand what I am trying to do. I have read many things on the internet about ASP and SQL but they are no help. The lady I made that website for really likes how the flavor of the day shows up there, but for her to change the 31 files that correspond with the days of the month individually would be a mess for her to deal with. It would be a lot easier to insert an event into a day with the category of "Flavor of the Day" and then pull that day's Flavor out of the database, cause she would have one thing to do instead of lots and lots of things to do.
Any help would be appreciated.
What I want to do is, using an existing database setup for a calendar application, pull information out of the database and display a title of an entry that corresponds with the current date.
if you go to the address above, you will see that there is a sign graphic which has text over it that says an ice cream flavor. Right now I am using AJAX scripting to display a different HTML file for each day of the month, because the Flavor of the day changes every day. I want to pull the flavor of the day from the calendar, since the manager will have the flavors of the day in the calendar as events.
here's what i've got in a test file.
Code:
<% Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Driver={SQL Server};Server=SERVERLOCATION;Database=DATABASENAME;Uid=MYUSERNAME;Pwd='MYPASSWORD';" SQL ="SELECT event_title FROM events" Dim objRec Set objRec = Server.CreateObject("ADODB.Recordset") objRec.Open SQL, objConn, 0, 1, 2 %>
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'USERNAME'. /testing.asp, line 4
Any help would be appreciated.
Comment