Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums

Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums (http://www.freeadvertisingzone.com/index.php)
-   General Free Advertising Directories (http://www.freeadvertisingzone.com/forumdisplay.php?f=83)
-   -   VB.NET and sql waiter database operations jotted (http://www.freeadvertisingzone.com/showthread.php?t=1233753)

05-20-2011 07:46 PM

VB.NET and sql waiter database operations jotted
 
Imports System.Data ,GHD Rare Straighteners
Imports System.Data.SqlClient
Imports System.ComponentModel
Public Class DataBase
Implements IDisposable
Private SqlConn As SqlConnection
Public Shared sConn As String = = 30; Data Source = ServerName
Public Sub Dispose () Implements System.IDisposable.Dispose
Dispose (True)
GC.SuppressFinalize (True)
End Sub
Protected Sub Dispose (ByVal disposing As Boolean)
If disposing True Then
Return
; End If
If SqlConn Is Nothing = False Then
SqlConn . Dispose ()
SqlConn = Nothing
End If
End Sub
Public Sub Open ()
If SqlConn Is Nothing = True Then
; SqlConn = New SqlConnection (DataBase.sConn)
SqlConn.Open ()
End If
End Sub
Public Sub Close ()
If SqlConn Is Nothing = False Then
; SqlConn.Close ()
End If
End Sub
Public Function GetDataTables () As Collections.ArrayList
Me.Open ()
; Dim t As New Collections.ArrayList
Dim dt As DataTable
dt = Me.SqlConn.GetSchema (; If row (; t.Add (row (br> Next row
Return t
End Function
Public Function RunSelectSQL (ByVal sSQLString As System.String) As DataView
Me.Open ()
; Dim SqlDS As DataSet = New DataSet
Dim SqlDA As SqlDataAdapter = New SqlDataAdapter (sSQLString,GHD Red Straighteners, Me.SqlConn)
SqlDA.Fill (SqlDS)
Return SqlDS.Tables (0). DefaultView
End Function
Public Function RunDelOrInsSQL (ByVal sSQLString As System.String)
Me.Open ()
; Dim SqlComm As SqlCommand = New SqlCommand (sSQLString,GHD Green Butterfly 2011, Me.SqlConn)
SqlComm.ExecuteNonQuery ()
Return 0
End Function
End Class


All times are GMT. The time now is 11:59 PM.

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum