Link to home
Start Free TrialLog in
Avatar of kenny4820
kenny4820

asked on

add data in marquee

i wanna add text in my database to a marquee ? how can i do it ? thx lots
Avatar of hengzhe
hengzhe
Flag of China image

<%
dim rds,cnn
'create your connection object****
set rds=server.createobject("adodb.recordset")
sql="select * from smTable"
rds.open sql,cnn,1,3
%>
<marquee direction='left'><%= rds("COLUMNNAME") %></marquee>
Avatar of kenny4820
kenny4820

ASKER

this is in asp language? im using asp.net
I am not familiar with asp.net,but I think the principle is the same.
i cant quite understand it can u give better description ? really thx
Use ado(ado.net) to retrieve datium you need,then store it  in a variable which can be utilized to dynamically generate html code that represents a marquee tag,
such as '<marquee direction='left'>This text was generated dynamically according to corresponding datium in db.</marquee>'
sorry for asking again, ok i understand what are u saying , what i dun understand is how to retrieve data from database for only 1 ? if im not mistaken all the data are retrieve in table format right?

This is my connection , can u help me alter easier for me and u thx alot , really sorry for keep on asking ........

Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=C:\Soccer\Socce"& _
".mdb"
        Dim dbConnection As System.Data.IDbConnection = New System.Data.OleDb.OleDbConnection(connectionString)

        Dim queryString As String = "SELECT [Web1].[header] FROM [Web1]"
        Dim dbCommand As System.Data.IDbCommand = New System.Data.OleDb.OleDbCommand
        dbCommand.CommandText = queryString
        dbCommand.Connection = dbConnection

        Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter
        dataAdapter.SelectCommand = dbCommand
        Dim dataSet As System.Data.DataSet = New System.Data.DataSet
        dataAdapter.Fill(dataSet)

anybody can help me?
ASKER CERTIFIED SOLUTION
Avatar of hengzhe
hengzhe
Flag of China image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
need to alter a bit

dim dataTable as DataTable=new DataTable


should be

dim datatable as system.data.datatable = new system.data.datatable