Click here to Skip to main content
15,912,205 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionpassword and username Pin
saraswathy14324-Jul-07 17:58
saraswathy14324-Jul-07 17:58 
AnswerRe: password and username Pin
Christian Graus24-Jul-07 19:01
protectorChristian Graus24-Jul-07 19:01 
AnswerRe: password and username Pin
Paul Conrad24-Jul-07 19:11
professionalPaul Conrad24-Jul-07 19:11 
Questionstrings Pin
seemamltn24-Jul-07 10:45
seemamltn24-Jul-07 10:45 
AnswerRe: strings Pin
The ANZAC24-Jul-07 11:09
The ANZAC24-Jul-07 11:09 
AnswerBAD USER! Pin
leckey24-Jul-07 16:33
leckey24-Jul-07 16:33 
AnswerRe: strings Pin
Paul Conrad24-Jul-07 19:12
professionalPaul Conrad24-Jul-07 19:12 
QuestionSolution for your DataAccess with question:ConfigurationManager issue:Proper Connection String for Windows Form App Pin
Jordan Martz24-Jul-07 9:58
Jordan Martz24-Jul-07 9:58 
Good day to you,
I'm just this a basic component for classDataAnalyzer. It's supposed to manage code establishing OleDb (Access) connections in Web Applications. Use this class to access what you need I guess that it'll help you get on your feet. Here's the Question for those if you choose to accept it. Suspicious | :suss: I've trying to convert this into code at use on a windows form. I need to be able to use this code, but the configuration manager namespace was developed for use on the Web. I need your help with a proper function for building a function that will manage the configuration string in a WinForm.
Thanks
<br />
Public Class AccessOleDb<br />
'''-----------------------------------------------------------------<br />
''' <summary>Gets the local access database connection string.</summary><br />
''' <history>[me] 7/02/07 Created </history><br />
'''-----------------------------------------------------------------<br />
Public Shared ReadOnly Property ConnectionString() As String<br />
Get<br />
Return ConfigurationManager.ConnectionStrings("ACCESS").ConnectionString<br />
End Get<br />
End Property<br />
'''-----------------------------------------------------------------<br />
''' <summary>Executes a sql query command.</summary><br />
''' <param name="query">Ole command to execute.</param><br />
''' <returns>Returns the number of rows affected.</returns><br />
''' <history>[me] 7/02/07 Created </history><br />
'''-----------------------------------------------------------------<br />
Public Shared Function ExecuteCommand(ByVal query As String) As Integer<br />
Dim oleConn As OleDbConnection = New OleDbConnection(ConnectionString)<br />
'Dim oleConn As New OleDbConnection(ConnectionString)<br />
oleConn.Open()<br />
Dim oleCmd As New OleDbCommand(query, oleConn)<br />
Dim intRows As Integer = oleCmd.ExecuteNonQuery()<br />
oleConn.Close()<br />
oleConn.Dispose()<br />
oleCmd.Dispose()<br />
Return intRows<br />
End Function<br />
'''-----------------------------------------------------------------<br />
''' <summary>Populates a DataSet from the results of the specified query.</summary><br />
''' <param name="query">OleDB query to run against the Access Database.</param><br />
''' <returns>Returns a DataSet with the results of the Access Query..</returns><br />
''' <history>[me] 7/02/07 Created </history><br />
'''-----------------------------------------------------------------<br />
Public Overloads Shared Function PopulateDataSet(ByVal query As String) As DataSet<br />
Dim oleConn As New OleDbConnection(ConnectionString)<br />
oleConn.Open()<br />
Dim oaTemp As New OleDbDataAdapter()<br />
oaTemp.SelectCommand = New OleDbCommand(query, oleConn)<br />
Dim dsTemp As New DataSet()<br />
oaTemp.Fill(dsTemp)<br />
oleConn.Close()<br />
oleConn.Dispose()<br />
oaTemp.Dispose()<br />
Return dsTemp<br />
End Function<br />
End Class 


Thanks for your help and best wishes to you.
J
AnswerRe: Solution for your DataAccess with question:ConfigurationManager issue:Proper Connection String for Windows Form App Pin
Dave Kreskowiak24-Jul-07 10:12
mveDave Kreskowiak24-Jul-07 10:12 
QuestionRe: Solution for your DataAccess with question:ConfigurationManager issue:Proper Connection String for Windows Form App Pin
Jordan Martz24-Jul-07 10:32
Jordan Martz24-Jul-07 10:32 
AnswerRe: Solution for your DataAccess with question:ConfigurationManager issue:Proper Connection String for Windows Form App Pin
Dave Kreskowiak24-Jul-07 12:53
mveDave Kreskowiak24-Jul-07 12:53 
QuestionDid an EXE file Created Through VB.Net Runs in Network drives Pin
oerslaafroze24-Jul-07 9:34
oerslaafroze24-Jul-07 9:34 
AnswerRe: Did an EXE file Created Through VB.Net Runs in Network drives Pin
Dave Kreskowiak24-Jul-07 9:57
mveDave Kreskowiak24-Jul-07 9:57 
QuestionEliminate SAVE AS dialog box Pin
flias200124-Jul-07 8:58
flias200124-Jul-07 8:58 
AnswerRe: Eliminate SAVE AS dialog box Pin
Dave Kreskowiak24-Jul-07 9:08
mveDave Kreskowiak24-Jul-07 9:08 
GeneralRe: Eliminate SAVE AS dialog box Pin
flias200124-Jul-07 9:20
flias200124-Jul-07 9:20 
GeneralRe: Eliminate SAVE AS dialog box Pin
Dave Kreskowiak24-Jul-07 9:25
mveDave Kreskowiak24-Jul-07 9:25 
QuestionChange font color on datagrid row Pin
Cory Kimble24-Jul-07 8:47
Cory Kimble24-Jul-07 8:47 
AnswerRe: Change font color on datagrid row Pin
Dave Kreskowiak24-Jul-07 9:13
mveDave Kreskowiak24-Jul-07 9:13 
QuestionNeed Help in Creating database project setup file Pin
bonny02022724-Jul-07 8:20
bonny02022724-Jul-07 8:20 
AnswerRe: Need Help in Creating database project setup file Pin
'Drew24-Jul-07 8:32
'Drew24-Jul-07 8:32 
AnswerRe: Need Help in Creating database project setup file Pin
Kschuler24-Jul-07 8:35
Kschuler24-Jul-07 8:35 
QuestionValidation Pin
programmervb.netc++24-Jul-07 7:27
programmervb.netc++24-Jul-07 7:27 
AnswerRe: Validation Pin
Dave Kreskowiak24-Jul-07 7:40
mveDave Kreskowiak24-Jul-07 7:40 
GeneralRe: Validation Pin
programmervb.netc++24-Jul-07 7:49
programmervb.netc++24-Jul-07 7:49 

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.