Forums

ASP

This topic is locked

ASP application help!!!

Posted 17 Feb 2003 12:04:41
1
has voted
17 Feb 2003 12:04:41 Sokac / posted:
I need help with application variable.
I have web site with Multilanguage support.
In database I created table called «ldd»-language dependable data.
In that table I have 6 columns for languages.
Hr-Croatian
En-English
De-German and so on.
File ldd.asp is included in every page with Multilanguage support.
Below is part of Ldd.asp
%
Set ldd1 = Server.CreateObject("ADODB.Recordset"
ldd1.ActiveConnection = MM_infobase_STRING
ldd1.Source = "SELECT en FROM dbo.ldd"
ldd1.CursorType = 0
ldd1.CursorLocation = 2
ldd1.LockType = 1
ldd1.Open()
ldd1_numRows = 0
application("en"=ldd1.GetRows(50,0)
%>
<%
ldd1.Close()
Set ldd1 = Nothing
%>
<%
Set ldd2 = Server.CreateObject("ADODB.Recordset"
ldd2.ActiveConnection = MM_infobase_STRING
ldd2.Source = "SELECT de FROM dbo.ldd"
ldd2.CursorType = 0
ldd2.CursorLocation = 2
ldd2.LockType = 1
ldd2.Open()
ldd2_numRows = 0
application("de"=ldd2.GetRows(50,0)
%>
I take entire language column with getrows and then I put that in application called «hr» for Croatian, «en» for English and so on.
Everything works fine.
How to modify ldd.asp so that I put data in application only if there is no application.
I don’t like to open application every time when page load.

Reply to this topic