|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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? |
|
#3
|
|||
|
|||
|
thx
Hey,
Actually the software developr came thru. They recompiled to enable a nice neat CSV file. Thanks for all your help! |
|
#4
|
|||
|
|||
|
hehe, no worries! Glad you got it sorted!!
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > 2 Access tables into 1 ASP table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|