Solved

How to  get result from TSQL to JavaSCript  using old classic ASP page ?

Posted on 2016-08-12
2
52 Views
Last Modified: 2016-09-23
We use classic ASP page
there is below vbscript code where :
1) invoiceResult  is VB Array
2)invoiceSql : stored proc on SQL server
3) ricoh  is company library which I cannot change ( no accsess)

 invoiceResult = ricoh.storedproc(invoiceSql
Question I need javascript array instead off vb6
Does not matter how I get it.
Can I transform somehow bv6 array to  javascript array?
Or  Can I use Ajax to get SQL data from classic ASP?
0
Comment
Question by:Yampolka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
funwithdotnet earned 500 total points
ID: 41755691
You can inject the results set directly into javascript. The VB runs before any javascript. You can use the VB array to populate data in any javascript script you like.

Something like ...
<%
dim delimiter = ""
dim jsString  = "var jsArray = ["
For each [item in VBArray]
 jsString &= delimiter & """" & [specific string item in VBArray] & """"
delimiter = ", "
Next
jsString  &= "];"
%>
<%=jsString%> <!-- Contains the completed javascript array declaration that can be injected in to any client-side script.-->

Open in new window

0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql, how to change the data type after data loading? 9 59
Using a SUBQUERY for the set variable 10 29
Drag & Drop Error 5 32
how to use ROW_NUMBER() correctly 8 44
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question