Click here to Skip to main content
15,911,531 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Help to Peek & Poke with .NET Pin
IronHydra24-Apr-04 20:48
IronHydra24-Apr-04 20:48 
GeneralRe: Help to Peek & Poke with .NET Pin
Dave Kreskowiak25-Apr-04 6:19
mveDave Kreskowiak25-Apr-04 6:19 
GeneralCrystal Report Pin
Anonymous24-Apr-04 5:22
Anonymous24-Apr-04 5:22 
GeneralRe: Crystal Report Pin
RichardGrimmer26-Apr-04 4:03
RichardGrimmer26-Apr-04 4:03 
GeneralSystem.Security.SecurityException Pin
mshola24-Apr-04 0:38
mshola24-Apr-04 0:38 
GeneralRe: System.Security.SecurityException Pin
Nathan Blomquist24-Apr-04 10:22
Nathan Blomquist24-Apr-04 10:22 
GeneralIm a VB.NET newbie Pin
markitoz23-Apr-04 22:11
markitoz23-Apr-04 22:11 
GeneralRe: Im a VB.NET newbie Pin
Dave Kreskowiak24-Apr-04 2:39
mveDave Kreskowiak24-Apr-04 2:39 
ADO.NET is the way to go to get your app talking to an SQL Server and is absolutely necessary.
Here is a little snippet from the SQL class for a website I'm working on:
        Public Shared Function GetGameStatus() As GameStatus
            Dim sConnectionString As String
            Dim oConnection As SqlConnection
            Dim oCommand As SqlCommand
 
            Try
                sConnectionString = ConfigurationSettings.AppSettings("DataConnection")
                oConnection = New SqlConnection(sConnectionString)
                oCommand = New SqlCommand
 
                oCommand.Connection = oConnection
                oCommand.CommandText = "SQLGetSystemParameter"
                oCommand.CommandType = CommandType.StoredProcedure
 
                Dim sqlParam As New SqlParameter("@ParmName", SqlDbType.NVarChar, 25)
                sqlParam.Value = "GameStatus"
                oCommand.Parameters.Add(sqlParam)
 
                sqlParam = New SqlParameter("@ParmValue", SqlDbType.NVarChar, 255)
                sqlParam.Direction = ParameterDirection.Output
                oCommand.Parameters.Add(sqlParam)
 
                sqlParam = New SqlParameter("RETURN_VALUE", SqlDbType.Int)
                sqlParam.Direction = ParameterDirection.ReturnValue
                oCommand.Parameters.Add(sqlParam)
 
                oConnection.Open()
                oCommand.ExecuteNonQuery()
                oConnection.Close()
 
                Dim iReturnCheck As Integer = Integer.Parse(oCommand.Parameters("RETURN_VALUE").Value)
                If iReturnCheck = 1 Then
                    GetGameStatus = GameStatus.Invalid
                Else
                    GetGameStatus = iReturnCheck
                End If
            Catch ex As Exception
                GetGameStatus = GameStatus.Invalid
            Finally
                If Not oCommand Is Nothing Then
                    oCommand.Dispose()
                End If
                If Not oConnection Is Nothing Then
                    If Not oConnection.State = ConnectionState.Closed Then
                        oConnection.Close()
                    End If
                    oConnection.Dispose()
                End If
            End Try
            Return GetGameStatus
        End Function



RageInTheMachine9532
GeneralRe: Im a VB.NET newbie Pin
gUrM33T24-Apr-04 18:58
gUrM33T24-Apr-04 18:58 
GeneralRe: Im a VB.NET newbie Pin
Colin Angus Mackay24-Apr-04 13:25
Colin Angus Mackay24-Apr-04 13:25 
GeneralRe: Im a VB.NET newbie Pin
fargate27-Apr-04 17:38
fargate27-Apr-04 17:38 
GeneralVB products Pin
Dave Orlando23-Apr-04 12:56
sussDave Orlando23-Apr-04 12:56 
GeneralRe: VB products Pin
Hesham Amin24-Apr-04 1:41
Hesham Amin24-Apr-04 1:41 
Generalconverter Pin
tenzeel23-Apr-04 8:36
tenzeel23-Apr-04 8:36 
GeneralRe: converter Pin
Dave Kreskowiak24-Apr-04 2:48
mveDave Kreskowiak24-Apr-04 2:48 
GeneralObject reference error Pin
ColleenG23-Apr-04 8:00
ColleenG23-Apr-04 8:00 
GeneralRe: Object reference error Pin
Dave Kreskowiak24-Apr-04 2:51
mveDave Kreskowiak24-Apr-04 2:51 
QuestionCrystal reports Question? Pin
hounetdev23-Apr-04 5:20
hounetdev23-Apr-04 5:20 
GeneralUsing XP theme in VB6 Pin
Andy H23-Apr-04 5:09
Andy H23-Apr-04 5:09 
GeneralArray.IndexOf with an array of structures Pin
ebbie23-Apr-04 3:31
ebbie23-Apr-04 3:31 
GeneralRe: Array.IndexOf with an array of structures Pin
Colin Angus Mackay23-Apr-04 8:27
Colin Angus Mackay23-Apr-04 8:27 
GeneralColor Coding Text Pin
mtone23-Apr-04 3:12
mtone23-Apr-04 3:12 
GeneralRe: Color Coding Text Pin
PaleyX23-Apr-04 3:24
PaleyX23-Apr-04 3:24 
GeneralRe: Color Coding Text Pin
mtone23-Apr-04 6:38
mtone23-Apr-04 6:38 
GeneralRe: Color Coding Text Pin
PaleyX24-Apr-04 5:30
PaleyX24-Apr-04 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.