2 Clarifications in Databsing....

liunx

Guest
Hi Friends
This group has been a really good one for me. Most of my clarifications have been cleared whenever I ask. I am now again with some problems. Hope I get some quick remedy for my problems.
Have 2 clarifications.
1. I have a asp file which has connection string to the database. It does not use any DSN. Just a connection string. (Hope I am clear). Now i have many subdirectories in which i am calling this file. For some files the path has to ../ and for other subdirectries it should be called ../../. As of now i am making many connection string files for many files. I know this should not be done. Can this be avoided? If so what is the remedy?

2. One of my client wants the Input / Output status to be reflected dynamically when the DB is updated. This is basically an Intranet application. It needs to be developed in ASP. I shall explain you. I have some fields in Access DB its just in zeros and ones.
100010101001000101001010101. This value is subject to change on every second.
I have to display a bulb type on the on the webpage. If the field is Zero i need to display red bulb and if its green bulb then it should be green bulb.
I managed to develop by refreshing the page on every second. But as there are many images and scripting the refreshing takes even before the page is loaded. Is there any way so that when ever the DB is changed, without any refreshing the img should be changed. Like can we use any Axtive-X, flash objects which access the DB or any other method. I just need a solution for this.


Hope this group will give its valuable suggestions for these 2 queries.


Thanks and best regards

Karthik.RKarthik - put your database routines into a single file which is included where necessary - that way you only need the one connection string.

I dunno about the second one, but that can't be done in ASP by itself.Thanks for the post.
I guess you have not understood my first question properly. I have many directories in which there are many subdirectories . When ever I call the conn string file which is in a subdirectory, the path varies to ../ which has to be added in the connection string. As for now for each subdirectory in a directory, I am creating a conn string file. Can i avoid this ?

Thanks once again.

regards
Karthik.Rthat is not correct. If your using a Application variable with no seperate applications then just use

Application("COnn") = Server.MapPath("/db/") & "my.mdb;etc;"you should create an page that queries the db that returns XML. on the client page use a the DOM object to query the ASP page that returns XML, update the page with the correct values....hey... Thanks for the post..

I am not getting you dear. Can u please explain me with an example... So that i can incorporate it in my project.

Thanks once again..

Karthik.RCreate a new ASP page that creates XML output only. It will encapsulate your data.

Use javascript to get the data from the server using the XML DOM object. Update the page based on the XML.Hey thanks man.
Sorry to disturb you so much...
Please attach me a sample code for the same. Bcoz I am very new to xml / ASP.
I tried doing google search, but could not find the right stuff.
Thanks for the help in advance

regards

Karthik.R
 
Back
Top