Many, many thanks!!!!:rose: It's (almost) tha same code snippet I have played with, but I insisted to open HKEY_LOCAL_MACHINE\Enum (as in APIGuide's example), subkey that doesn't exist in WinXP, and when I noticed that, I forgot to restore some other unsuccesfull hacks:(. best regards, stefan b.
Paul Riley wrote: Contrary to popular opinion, it is possible to code VB well Fully agreed, I suppose we should watch how we talk about VB here in C++ country though. :laugh: :cool: Nick Parker
**The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
**
No. I will trigger the click event of a button on the form - thats my only avenue of siganlling VB remotely to do something. So the form and button should be off in the ozone somewhere...if I .hide it the click wont happen.. Thanks, ns
HA! Told you it was DLL versioning ;P Seriously though, I can see why that was confusing. I'd have expected it to fall on the Connection object. Glad you got there. Paul
In this example I am using the datadapter, as you can bind the whole resultset to the grid in one command, with the datareader you have to loop through the resultset. Dim oConnection As SqlClient.SqlConnection = New SqlClient.SqlConnection() Dim oCommand As SqlClient.SqlCommand = New SqlClient.SqlCommand() Dim oDataTableResources As Data.DataTable = New Data.DataTable() Dim oDataTableSites As Data.DataTable = New Data.DataTable() Dim oDataAdapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter() Dim sSiteName As String Dim sResourceName As String Const iDayLength As Integer = 86400 sSQL = "Select * from Category" gsConnectString = " Initial Catalog=" & UCase(Trim(Me.txtDB.Text)) & _ ";Data Source=" & UCase(Trim(Me.txtSVR.Text)) & _ ";User ID=" & UCase(Trim(Me.txtUID.Text)) & _ ";Password=" & Trim(Me.txtPWD.Text) & ";" oConnection.ConnectionString = gsConnectString Try oConnection.Open() Catch o As System.Exception MsgBox(o.Message, MsgBoxStyle.Critical, gsMessageBoxHeader) Me.Cursor = Cursors.Default Exit Sub End Try Try oCommand.Connection = oConnection oCommand.CommandText = sSQL oDataAdapter.SelectCommand = oCommand 'fill the data adapter oDataAdapter.Fill(oDataTableResources) 'bind to the datagrid dbgrdDataGrid.DataSource = oDataTableResources dbgrdDataGrid.ParentRowsVisible = False Catch o As System.Exception MsgBox(o.Message) Me.Cursor = Cursors.Default End Try I do not have any code of getting a specific cell from the grid. I am sure you will be able to find samples on the web. YASP
Actually, what it means is that you have "Networking" installed. Whether it's DHCP, NetBios, etc it will still show true. If you uninstall your Networking protocols, it should return false. I forget where I saw it but there is a way to detect the Network.
Yes, it can't be done. The only way I was able to do this was to Create a simple Class module and store the Class Objects within the Collection. 1.) Create a Class in your App. 2.) Create the Properties Public ID As Long Public intCounter As Integer Public Key As String That's it! Just create new instances of the class and store them in the Collection.:)
Hi There If you are going to use the resultset for display purpose only, it is better to use the datareader to retrieve the data as in the following piece of code. The code shows how to read the sql results into a combo box, but you would do the same for a text box (given that you only return one row from the db) I think it would also be easier to read the parameters from the input text boxes as you build up the sql string, ie: sSQl = "select * from publishers where name = " + txtName.text + " and date ........" etc Private Sub LoadInitData() Dim sConnect As String Dim sCategory As String Dim sType As String Dim sPrinter As String Dim odrCategory As OleDb.OleDbDataReader Dim odrType As OleDb.OleDbDataReader Dim odrPrinter As OleDb.OleDbDataReader Dim oConnection As OleDb.OleDbConnection = New OleDb.OleDbConnection() Dim oCommand As OleDb.OleDbCommand = New OleDb.OleDbCommand() Dim sDBPath As String sDBPath = Application.StartupPath sConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sDBPath & "\Inks.MDB" sCategory = "SELECT CATEGORY.CATEGORY FROM CATEGORY ORDER BY CATEGORY.CATEGORY" Try oConnection.ConnectionString = sConnect oConnection.Open() 'get categories oCommand.CommandText = sCategory oCommand.Connection = oConnection odrCategory = oCommand.ExecuteReader While odrCategory.Read Me.cmbCategory.Items.Add(odrCategory.GetString(0)) End While If cmbCategory.Items.Count > 0 Then cmbCategory.SelectedIndex = 0 End If odrCategory.Close() oConnection.Close() Catch o As System.Exception MsgBox(o.Message) Exit Sub End Try End Sub YASP
Perhaps knowning exactly what you want to "share" would help out more. Depending on the kind of data and its nature, there may be one or more solutions to your problem. - :eek: (i think i swallowed a bug) "there's more to life than skiing, when you find it let me know"
I would like to know how i can play a wave file through TAPI. My requirement is to hook up to a telephone number through a Modem and when the connection is successful, the application should play a wave file. I have succeded in connecting to a Telephone line using TAPI Can some one help please. Harihara Subramanian