Das ist immer noch ziemlich falsch...
Du kannst das Server-Objekt nicht auf dem Client verwenden... Das
versuchst Du aber...
Es wundert mich, dass Du das nicht an den Fehlern merkst, die es nr so
hageln d�rfte...
Schalt mal die Skript-Fehlermeldungen im IE an...
Versuch es mal hiermit:
<script language="VBscript">
<!--
Sub Window_OnLoad()
<%
dim myConn
dim rsStatus
dim strPath
dim strSQL
strPath = Server.MapPath("../database/UDL_prjMDB.udl")
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open "file name="& strPath
strSQL= "SELECT StatusName FROM Statvar"
Set rsStatus= myConn.Execute(strSQL)
Do While Not rsStatus.EOF
%>
StatusComboBox.AddItem("<%=rsStatus("StatusName")%>")
<%
rsStatus.MoveNext
Loop
rsStatus.Close
myConn.Close
%>
End Sub
-->
</script>
Claudius
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 27. Februar 2002 15:36
> To: ASP Datenbankprogrammierung
> Subject: [aspdedatabase] RE: ComboBox in ASP
>
>
>
>
> Hi Claudius,
>
> Ist mir bekannt, wenn auch noch nicht so lange...
> So hab ich's zuerst auch versucht. Hier der Code:
>
> <script language="VBscript">
> <!--
>
> Sub Window_OnLoad()
> dim myConn
> dim rsStatus
> dim strPath
> dim strSQL
>
> strPath = Server.MapPath("../database/UDL_prjMDB.udl")
>
> Set myConn = Server.CreateObject("ADODB.Connection")
> myConn.Open "file name="& strPath
> strSQL= "SELECT StatusName FROM Statvar"
> Set rsStatus= myConn.Execute(strSQL)
>
> <% Do While Not rsStatus.EOF %>
> StatusComboBox.AddItem("<%=rsStatus("StatusName")%>")
> <% rsStatus.MoveNext
> Loop
> rsStatus.Close
> myConn.Close %>
> End Sub
>
> -->
> </script>
>
>
>
> Stefan Groetz
>
>
>
>
>
> Claudius
>
> Ceteras To: ASP
> Datenbankprogrammierung
> <claudius@gmx
> <[EMAIL PROTECTED]>
> .de> cc:
>
> Subject:
> [aspdedatabase] RE: ComboBox in ASP
> 02/27/02 Header:
> Internal Use Only
> 03:20 PM
>
> Please
>
> respond to
>
> ASP
>
> Datenbankprog
>
> rammierung
>
>
>
>
>
>
>
>
> Ist Dir der Unterschied zwischen serverseitig und
> clientseitig bekannt?
>
> Serverseitig kannst Du keine combobox haben und falls das object
> clientseitig ist, dann musst Du die Anweisungen in ein Script-Tag
> einschliessen...
>
> Claudius
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Mittwoch, 27. Februar 2002 15:11
> > To: ASP Datenbankprogrammierung
> > Subject: [aspdedatabase] ComboBox in ASP
> >
> >
> >
> > Hallo Liste
> >
> > Mit dem untenstehenden Code versuche ich vergebens eine
> > ComboBox die ich als <object > eingebunden habe zu fuettern.
> > Hat jemand einen besseren (funktionierenden :-)) Vorschlag????
> >
> > Sub Window_OnLoad()
> > dim myConn
> > dim rsStatus
> > dim strPath
> > dim strSQL
> >
> > strPath = Server.MapPath("../database/UDL_prjMDB.udl")
> >
> > Set myConn = Server.CreateObject("ADODB.Connection")
> > myConn.Open "file name="& strPath
> > strSQL= "SELECT StatusName FROM Statvar"
> > Set rsStatus= myConn.Execute(strSQL)
> >
> > <% Do While Not rsStatus.EOF
> > response.write "StatusComboBox.AddItem" &
> > rsStatus("StatusName")
> > rsStatus.MoveNext
> > Loop
> > rsStatus.Close
> > myConn.Close %>
> > End Sub
> >
> >
> >
> > Stefan Groetz
> >
> >
> >
> >
> > -------------------------------------------------------------- --
> > Visit our Internet site at http://www.reuters.com
> >
> > Any views expressed in this message are those of the individual
> > sender, except where the sender specifically states them to be
> > the views of Reuters Ltd.
> >
> > | [aspdedatabase] als [EMAIL PROTECTED] subscribed
> > | http://www.aspgerman.com/archiv/aspdedatabase/ = Listenarchiv
> > | Sie k�nnen sich unter folgender URL an- und abmelden:
> > |
> http://www.aspgerman.com/aspgerman/listen/anme> lden/aspdedatabase.asp
> >
>
>
> | [aspdedatabase] als [EMAIL PROTECTED] subscribed
> | http://www.aspgerman.com/archiv/aspdedatabase/ = Listenarchiv
> | Sie k�nnen sich unter folgender URL an- und abmelden:
> | http://www.aspgerman.com/aspgerman/listen/anmelden/aspdedatabase.asp
>
>
>
>
>
>
> -------------------------------------------------------------- --
> Visit our Internet site at http://www.reuters.com
>
> Any views expressed in this message are those of the individual
> sender, except where the sender specifically states them to be
> the views of Reuters Ltd.
>
> | [aspdedatabase] als [EMAIL PROTECTED] subscribed
> | http://www.aspgerman.com/archiv/aspdedatabase/ = Listenarchiv
> | Sie k�nnen sich unter folgender URL an- und abmelden:
> | http://www.aspgerman.com/aspgerman/listen/anmelden/aspdedatabase.asp
>
| [aspdedatabase] als [email protected] subscribed
| http://www.aspgerman.com/archiv/aspdedatabase/ = Listenarchiv
| Sie k�nnen sich unter folgender URL an- und abmelden:
| http://www.aspgerman.com/aspgerman/listen/anmelden/aspdedatabase.asp