Bilgisayar Bölümü ASP Kod ve Script Arşivi


Something of the Day

<%
Dim intDays,intStart,rsSite,rsTopNumber,objConn,strCon n

'The connection String, change the path To your database
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("YourDB.mdb") & ";"

Set objConn = server.createobject("ADODB.connection")
objConn.Open strConn
Set rsTopNumber=objConn.execute("Select count(*) from tblXXX")
intCount = rsTopNumber(0)
rsTopNumber.Close
Set rsTopNumber=Nothing

intDays = DatePart("y",now)

intStart = intdays Mod intCount
intStart = intStart + 1

Dim RecordsetDay
Dim RecordsetDay_numRows

Set RecordsetDay = Server.CreateObject("ADODB.Recordset")
RecordsetDay.ActiveConnection = strConn
RecordsetDay.Source = "Select * FROM tblXXX WHERE ID = " + Replace(intStart, "'", "''") + ""
RecordsetDay.CursorType = 0
RecordsetDay.CursorLocation = 2
RecordsetDay.LockType = 1
RecordsetDay.Open()

RecordsetDay_numRows = 0
%>

ASP Kitabı

 

Faydalılar: Altın Fiyatları |Hediye Kolye | pırlanta fiyatları
Ana Sayfa  Sık Kullanılanlara Ekle   admin[at]bilgisayarbolumu.com | © 2006 - 2022 Bilgisayarbolumu.com