|
|
|
|
|
Güvenlik Açığı Bildir | Hata Bildir | Tavsiye Et | Favorilerime ekle | Yorumları takip et
|
|
Veritabanı İçeriği (tr) hakkında yorumlar / Yeni Yorum Yaz
| asdsa / Veritabanı İçeriği - sadasd - 7.06.2010 / Cevapla |
<% strConn = "Provider=sqloledb;Data Source=127.0.0.1;Network Library=DBMSSOCN;Initial Catalog=Veritabani;User ID=KullaniciAdi;Password=Sifre;" SET objConn = Server.CreateObject("ADODB.Connection") objConn.Open strConn
SET RQ = Request.QueryString SET objRs = Server.CreateObject("ADODB.RecordSet") IF Request.QueryString("Tablo") = "All" THEN Set objTablolar = ObjConn.OpenSchema(20) Do Until objTablolar.EOF if objTablolar("TABLE_TYPE")<>"SYSTEM TABLE" THEN call FieldTara(objTablolar("TABLE_NAME")) end if objTablolar.MoveNext Loop
REsponse.Write "</table>" Elseif TRIM(Request.QueryString("Tablo")) = "" THEN Set objTablolar = ObjConn.OpenSchema(20) Do Until objTablolar.EOF if objTablolar("TABLE_TYPE")="TABLE" THEN Response.Write "<a href='" & REquest.ServerVariables("SCRIPT_NAME") & "?Tablo=" & objTablolar("TABLE_NAME") & "'>" & objTablolar("TABLE_NAME") & "(" & Say(objTablolar("TABLE_NAME")) & ")</a><br>" end if objTablolar.MoveNext Loop Response.WRite "<a href='" & Request.ServerVariables("SCRIPT_NAME") & "?Tablo=All'>Hepsini Göster</a>" Elseif Request.QueryString("Tablo") <> "" AND Request.QueryString("Tablo") <> "All" THEN Call FieldTara(TRIM(Request.QueryString("Tablo"))) End if
Function Say(strTablo) strSQL = "SELECT COUNT(*) FROM " & strTablo SET objRs = objConn.Execute(strSQL) Say = objRS(0) SET objRS = Server.CreateObject("ADODB.RecordSet") End Function Sub FieldTara(strTablo) strSQL = "SELECT * FROM " & strTablo objRs.Open strSQL, objConn, 1, 3 SET objFields = objRs.Fields
iToplam = objFields.Count Response.Write "<table align='center' border='1'><tr><th colspan='2'>" & strTablo & "</th></tr><tr>" For EACH objField IN objFields SELECT CASE objField.Type CASE 3 strType = "Otomatik Sayi" CASE 202 strType = "Metin" CASE 203 strType = "Not" CASE 11 strType = "Evet/Hayir" CASE 135 strType = "Tarih Saat" End SELECT Response.Write "<td>" & objField.Name & "("& strType & ")</td>" ' Response.Write objField.Value Next ' Response.Write "</table>" If Not objRs.Eof Then strIcerik = objRs.GetString(,,"</td><td>", "</td></tr><tr><td>", " ") Response.Write "</tr><tr><td>" & strIcerik & "</td></tr></table>" End if objRs.Close End Sub %> |
|
1 - 26 arası / 1 toplam yorum
Yorum Yaz
|
|
|
|