Hi,
I really mixed VBScript and JavaScript! Unfortunately I have to script
it on the client-side, so an ASP-Solution can't be used (I only have
access at this one special SQL-Server table and nothing more)...
The proper script looks like that:
<SCRIPT type="text/javascript">
<!--
function Aufruf(){
var rst;
var dsn;
var sql;
var newWindow;
rst = new ActiveXObject("ADODB.Recordset");
dsn = new ActiveXObject("ADODB.Connection");
dsn.Open ("Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=myID;Initial Catalog=Projekt;Data Source=MyServer;pwd=mypass");
sql = ("select gpar_name1, gpar_name2 from adress");
rst.Open (sql, dsn);
newWindow = window.open("","","width=600, height=400,top=200
left=200,scrollbars");
while (!rst.EOF){
newWindow.document.write(rst(0) + " " + rst (1));
newWindow.document.write("<br>");
rst.moveNext();
}
rst.Close();
}
Thanks for your help, advices and tips :-))
Andy
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!