asp and combo box

collie

New member
asp and combo box

Hi, Can you please help me with the following; I have a sql database with movie names. I have a visual basic dll with the following code: Function allmovies() Dim StrSql As String allmovies = allmovies & ``<html><body><table>`` Rs.Open ``select moviename from movies``, Cn, adOpenKeyset, adLockOptimistic For i = 1 To Rs.RecordCount allmovies = allmovies & ``<td><tr> `` & Rs.Fields(``Moviename``) & ``</td></tr>`` Rs.MoveNext allmovies = allmovies & ``</table></body></html>`` Next i End Function ---------------------------------------------------------------------------------------------------------- I have a asp page with a combo box where i want to enter the movie names from the database. i want it done automatically so if i change a movie in the db the combo box will be updated accordingly. How can i write it? I will appreciate your help.
 

collie

New member
dll

i thought it would be easier as i have to use many different functions. think i shouldn`t use dll?
 

chanand

New member
האם לזה כוונתך?

<SELECT size=2 name=select1> do until r.eof Response.Write``<OPTION value=``& r(``movie``)&``>``& r(``movie``)&``</OPTION>`` loop </SELECT>
 

collie

New member
dll

something like that except it doesn`t work i have included my source code maybe it will be easier that way ps. i have a movies table in sql server
 

chanand

New member
למה לא עובד?

העתקתי את זה מתוך קובץ שלי שעובד פשוט תשנה את שמות המשתנים
 
למעלה