Tobias Scheck: Select-Ergebnis in Variable (VBScript)

Beitrag lesen

Hi,

so geht's:

' this code opens the database
myDSN="DSN=Student;uid=student;pwd=magic"
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN

' this code retrieves the data
mySQL="select * from publishers where state='NY'"
set rstemp=conntemp.execute(mySQL)

' put field into variable
name=rstemp("name")

Gruss
Tobias