Click here to Skip to main content
15,902,112 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionProblem in VB while trying to execute SQL Code Pin
nhsal6918-Nov-09 3:37
nhsal6918-Nov-09 3:37 
AnswerRe: Problem in VB while trying to execute SQL Code Pin
Eduard Keilholz18-Nov-09 4:08
Eduard Keilholz18-Nov-09 4:08 
GeneralRe: Problem in VB while trying to execute SQL Code Pin
nhsal6918-Nov-09 4:17
nhsal6918-Nov-09 4:17 
GeneralRe: Problem in VB while trying to execute SQL Code Pin
Luc Pattyn18-Nov-09 5:02
sitebuilderLuc Pattyn18-Nov-09 5:02 
AnswerRe: Problem in VB while trying to execute SQL Code Pin
The Man from U.N.C.L.E.18-Nov-09 8:01
The Man from U.N.C.L.E.18-Nov-09 8:01 
GeneralRe: Problem in VB while trying to execute SQL Code Pin
nhsal6918-Nov-09 21:13
nhsal6918-Nov-09 21:13 
GeneralRe: Problem in VB while trying to execute SQL Code Pin
Ashfield18-Nov-09 21:30
Ashfield18-Nov-09 21:30 
GeneralRe: Problem in VB while trying to execute SQL Code Pin
nhsal6918-Nov-09 23:08
nhsal6918-Nov-09 23:08 
Problem resolved,

here is the code for the SQL connection:

<br />
        Dim mycon As New SqlConnection(conString)<br />
<br />
        Dim SQLConn As New SqlConnection() 'The SQL Connection<br />
        Dim SQLCmd As New SqlCommand() 'The SQL Command<br />
<br />
        SQLConn.ConnectionString = myconnection 'Set the Connection String<br />
        SQLConn.Open() 'Open the connection<br />
<br />
        SQLCmd.Connection = SQLConn 'Sets the Connection to use with the SQL Command<br />
        SQLCmd.CommandText = SQLStr 'Sets the SQL String<br />
        SQLCmd.CommandTimeout = 60<br />
<br />
<br />
        SQLCmd.ExecuteNonQuery() 'Executes SQL Commands Non-Querys only<br />
<br />
        SQLConn.Close() 'Close the connection <br />
        mycon.Close()<br />
        Console.WriteLine("Connection Closed")<br />


The Bolded lin ei the new one which resolves my issue..

Thanks
GeneralRe: Problem in VB while trying to execute SQL Code Pin
Ashfield19-Nov-09 1:25
Ashfield19-Nov-09 1:25 
GeneralRe: Problem in VB while trying to execute SQL Code Pin
The Man from U.N.C.L.E.18-Nov-09 22:44
The Man from U.N.C.L.E.18-Nov-09 22:44 
QuestionConsole application Pin
offroaderdan17-Nov-09 23:35
offroaderdan17-Nov-09 23:35 
AnswerRe: Console application Pin
Richard MacCutchan18-Nov-09 0:05
mveRichard MacCutchan18-Nov-09 0:05 
AnswerRe: Console application Pin
Dave Kreskowiak18-Nov-09 8:35
mveDave Kreskowiak18-Nov-09 8:35 
AnswerRe: Console application Pin
Ian Shlasko18-Nov-09 10:27
Ian Shlasko18-Nov-09 10:27 
AnswerRe: Console application [modified] Pin
DaveAuld18-Nov-09 11:02
professionalDaveAuld18-Nov-09 11:02 
QuestionHow to fire the DropDownList.SelectedIndexChanged event Pin
MacIntyre17-Nov-09 18:46
MacIntyre17-Nov-09 18:46 
AnswerRe: How to fire the DropDownList.SelectedIndexChanged event Pin
Dave Kreskowiak19-Nov-09 3:40
mveDave Kreskowiak19-Nov-09 3:40 
QuestionPermission Denied while Deleting Temporary Files Pin
Nash - ThE cOdE sLiZeR17-Nov-09 17:59
Nash - ThE cOdE sLiZeR17-Nov-09 17:59 
AnswerRe: Permission Denied while Deleting Temporary Files Pin
The Man from U.N.C.L.E.17-Nov-09 20:58
The Man from U.N.C.L.E.17-Nov-09 20:58 
GeneralRe: Permission Denied while Deleting Temporary Files Pin
Nash - ThE cOdE sLiZeR17-Nov-09 21:54
Nash - ThE cOdE sLiZeR17-Nov-09 21:54 
GeneralRe: Permission Denied while Deleting Temporary Files Pin
Shameel17-Nov-09 22:18
professionalShameel17-Nov-09 22:18 
GeneralRe: Permission Denied while Deleting Temporary Files Pin
Nash - ThE cOdE sLiZeR17-Nov-09 22:42
Nash - ThE cOdE sLiZeR17-Nov-09 22:42 
GeneralRe: Permission Denied while Deleting Temporary Files Pin
Shameel18-Nov-09 7:01
professionalShameel18-Nov-09 7:01 
AnswerRe: Permission Denied while Deleting Temporary Files Pin
Luc Pattyn17-Nov-09 23:30
sitebuilderLuc Pattyn17-Nov-09 23:30 
GeneralRe: Permission Denied while Deleting Temporary Files Pin
Nash - ThE cOdE sLiZeR17-Nov-09 23:34
Nash - ThE cOdE sLiZeR17-Nov-09 23:34 

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.