Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 13th, 2003, 02:20 AM
pixel_ronin pixel_ronin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 8 pixel_ronin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question 2 Access tables into 1 ASP table

I spoke to the developer @ Music Librarian and they are pretty
much unwilling to change the exporting functionality. They're looking "into" it - but I'm not keeping my fingers crossed.

So, I have done the following.
Parsed the whatever-delimited txt file this way
==============================================
<%

DIM databaseMonths(12)
databaseMonths(0) = "jan"
databaseMonths(1) = "feb"
databaseMonths(2) = "mar"
databaseMonths(3) = "apr"
databaseMonths(4) = "may"
databaseMonths(5) = "jun"
databaseMonths(6) = "jul"
databaseMonths(7) = "aug"
databaseMonths(8) = "sep"
databaseMonths(9) = "oct"
databaseMonths(10) = "nov"
databaseMonths(11) = "dec"

databaseYear = MID(REQUEST("yr"),3,2)
'---SET VARIABLES AND OPEN DATA FILE
dim thepath
thepath = server.mappath("/cms/FileLib/") & "\"
Response.ContentType="application/vnd.ms-excel"
set fso=Server.CreateObject("Scripting.FileSystemObject")
'SET playlistObject = Server.CreateObject("Scripting.FileSystemObject")
set file=fso.OpenTextFile(thepath & databaseMonths(REQUEST("mo")-1) & databaseYear & ".txt")
'set file=fso.OpenTextFile("D:\Inetpub\wwwroot\test\apr03.txt")
'SET playlist = playlistObject.OpenTextFile(thepath & databaseMonths(REQUEST("mo")-1) & databaseYear & ".txt")

size1=len(" 12:00 AM ")
size2=len("PROGRAM ")
size3=len("Parisian Quartet No. 10 (Nouveau No. 4)")
%>
<table border=1 CELLPADDING="1" CELLSPACING="1" BORDERCOLOR="#FFFFFF" BGCOLOR="#CCCCCC">
<%
function getLastNum(stext)
s=""
for i=len(stext) to 1 step -1
if mid(stext,i,1)<>" " then
s=s+mid(stext,i,1)
else
i=-1
end if
next
getLastNum=s
end function
while not file.AtEndOfStream
sline=file.ReadLine
if sline<>" " AND sline<>"" then
if instr(1,sline,"PLAY DATE:")=0 then
stime=left(sline,size1)
sline=replace(sline,stime,"")

stype=left(sline,size2)
sline=replace(sline,stype,"")

snumber=""
snumber=CStr(getNum(sline))
sline=replace(sline,snumber,"")

slastnumber=getLastNum(sline)
sline=replace(sline,slastnumber,"")

stitle=left(sline,size3)
sprod=replace(sline,stitle,"")

if snumber<>"1.#QNAN" then
%>
<tr BORDERCOLOR="#FFFFFF">
<td><font size=2><%=stime%></font>
</td>
<td><font size=2><%=stype%></font>
</td>
<td><font size=2><%=snumber%></font>
</td>
<td><font size=2><%=stitle%></font>
</td>
<td><font size=2><pre><%=sprod%></pre></font>
</td>
<td><font size=2><pre><%=slastnumber%></pre></font>
</td>
</tr>
<%
end if
else
%>
<tr>
<td colspan=6 BORDERCOLOR="#FFFFFF"><font size=3><b><%=sline%></b></font>
</td>
</tr>
<%
end if
end if
wend
%>
</table>
<script language=javascript runat="server">
function getNum(str)
{
return parseInt(str)
}
</script>
<%
rsPLAYlist.Close()
Set rsPLAYlist = Nothing
%>
=============================================
http://wide-awake-garage.homeip.net...&yr=2003&dy=Sat

This creates a excel wrkbok that I can manage to export a tab-delimited file into Access then use my limited experience in, <embarrassed> MM Dreamweaver to display the recordset by three session variables:
1) current time
2) Current day
3) Current month
I hate to go the well on this thread, but do you know how I could merge two Access tables by one criteria/variable? Ideally, I would like the time query to set the db in action then display the playlist by time, day, month under the table header that contains the programming information from the radio stations program Access db. I'm mean, I have one table that contains the station programming information, and then I have this playlist file residing in another table. Is it possible to have a faction build the program info in the table header then strip in the playlist info accordingly?
For I would like to have the user to see what playing by those three criteria - this was gleaned from a survey.
More importantly - I would like to have the front page display the current composition, real-time, via a timer that queries the db for the current:
1) composition title
2) composer
3) program title/description
4) announcer bio

I have bitten off WAY more than I can chew. I would greatly appreciate any help you could offer.

Reply With Quote
  #2  
Old April 16th, 2003, 03:44 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via Yahoo to fakker
woah, that took a bit of reading! lol!!

so if I'm right, you need two tables merging in to the one query to export that data to a CSV file?
__________________
Matt 'Fakker' Facer

mattfacer.com

Reply With Quote
  #3  
Old April 16th, 2003, 08:26 PM
pixel_ronin pixel_ronin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 8 pixel_ronin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thx

Hey,
Actually the software developr came thru. They recompiled to enable a nice neat CSV file. Thanks for all your help!

Reply With Quote
  #4  
Old April 17th, 2003, 02:23 AM
fakker fakker is offline
The calm b4 the storm
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Manchester, UK
Posts: 404 fakker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via Yahoo to fakker
hehe, no worries! Glad you got it sorted!!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > 2 Access tables into 1 ASP table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway