BBS class

xiaoxiao2021-03-06  44

Imports system.dataimports system.data.oledbimports system.Webimports System.Web.ui.pageimports System.Web.httpContextimports System.Web.mail

Public class bbs 'Procedure Description:' getTable Enter a SQL to get a table 'record_del delete record number, overload, input record number, table name, no return' SQLEXECUTENONQUERY perform SQL, overload, input SQL, library name, no return

'In Web.confgi is as follows, add' ' '

'Role: Open a DataSet table' parameter: pass a SQL statement 'Dim MyConnection As New OLEDBConnection ("provider = microsoft.jet.Oledb.4.0; data source =" & server.mappath ("data / database.mdb")) 'DIM mysql as string = "select * from articles"' Dim MyConnection As New OLEDBConnection ("provider = microsoft.jet.Oledb.4.0; data source =" & server.mappath ("data / database.mdb"))

'********************************************************** ********** 'Get the operating system number' example: Browser: <% = getsbinfo (Request.SerVariables ("http_user_agent"), 1)%>
'operating system: <% = getsbinfo ("Http_user_Agent"), 2)%>
'Get value: MSIE 6.0 Windows 2003' *********************** *********************************** Public overloads Shared Function Getsbinfo (Byval Str As String, Byval Flag AS Integer IF INSTR (STR, ";")> 0 THEN DIM T T = Split (Str, ";") IF Ubound (T)> = 2 THEN T (2) = Replace (t (2), ")", "") T (2) = Replace (T (2), "NT 5.2", "2003") T (2) = Replace (T (2), "NT 5.1", "XP") T (2) = Replace (2), "NT 5.0", "2000") T (2) = Replace (T (2), "9X", "ME") T (1) = TRIM (T (1)) t 2) = TRIM (T (2)) if flag = 1 Then getsbinfo = T (1) else getsbinfo = t (2) end if ELSE IF FLAG = 1 Then getsbinfo = "Unknown" Else Getsbinfo = "Unknown" end if Endsbinfo = "Unknown" Else Getsbinfo = "Unknown" end if endness function

转载请注明原文地址:https://www.9cbs.com/read-75086.html

New Post(0)