Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Populating a JavaScript arrary from SQL database

Author  Topic 

atc12345
Starting Member

2 Posts

Posted - 2008-04-02 : 15:55:34
Can anyone help with the proper syntax to use to populate a JavaScript array using values from an SQL database.
I tried doing the following with no results:

Dim sql,Rs1

sql = ""
sql = sql & "SELECT EmpNumber FROM EmpFile "
Set Rs1 = Server.CreateObject("ADODB.Recordset")
Rs1.Open sql, DecryptedText(TheFile,"ConSQL"), 3
%>

<script language="JavaScript">
EmpNumber=new Array(<%=Rs1("EmpNumber")%>);
</script>

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-02 : 17:38:48
please do not cross post:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=100163

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -