|
in my project i need to open a word doc which contain tabel and images in a rich text box control or in any other control
mail me at rajesh.batchu@cesltd.com
|
|
|
|
|
well - you can't. You can use Word as a control, but you can't open a doc on a PC that doesn't have Word installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
how to give condition in application folder in setup and deployment in vb.net.
one more things is if that conditon is true then setup project will continue
otherwise instalation should terminate with out instalation.
thanks
mani
|
|
|
|
|
How do I connect to my SQL database using vb .net? My database name is Test and it is on my local machine.
my connection veriable is myConnection. I must use this also to open the database.
Please help
|
|
|
|
|
try this code
Public conTest As New SqlConnection
Public Function getConnection() As SqlClient.SqlConnection
If conTest.State = ConnectionState.Closed Then
conPMS.ConnectionString = "data source=" & Machine Name & ";initial catalog=Test;password="";persist security info=false;user id=sa;workstation id=Machine Name;packet size=4096"
End if
Prakash
|
|
|
|
|
Hi,newbee question,using VB net(2005). I have this form which has 10 TextBox being fill by a DataSet, up to here everything is fine except for 2 TextBox that are not showing currency, i try this code Me.txtCostPrice.Text = Format(Me.txtCostPrice.Text, "currency, $###.00") but it does not work. Help would be highly appreciated, Thank you
|
|
|
|
|
You can use a MaskedTextBox to set this sort of format up.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
How can i write vb.net project to work as "teleport pro" tool that can download directory and all files in that directory from path of an website
p/s: teleport pro is good dowloader it can download files, directory ... from url, path of an website
|
|
|
|
|
You won't be able to download all the files from just any website. The server has to allow you to do that, like enabling browsing the folers so you can get the file names. Otherwise, you're limited to just parsing and following links on every page to download only the files the site exposes to you.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi all,
I have a clickable row ("Dept.Name") in a datagrid. When someone click the dept.name, it should trigger a select query from other table and display all the data that has the same dept.name. How can do that? At the moment, the row is clickable but has no function yet.
Thanx in advance..
|
|
|
|
|
I'm assuming VB.NET 2005 here...
You can handle either the DataGridView's CurrentCellChanged or SelectionChanged events to do what you want. You can then either check the DGV's .SelectedRows property or .SelectedCells to get the ID of the record you'll need to look up in the database.
An example looks something like this:
Private Sub DGV1_CurrentCellChanged(blah, blah) Handles DGV1.CurrentCellChanged
With DGV1
If .SelectedCells.Count > 0 Then
Debug.WriteLine(.Rows(.SelectedCells(0).RowIndex).Cells("columnName").Value.ToString())
' Once you have to Primary key ID of the row you want, execute a query
' to grab that record and do what you want with it.
End If
End With
End Sub
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I want to display remote log files through a vb.net 1.1 winform app. As these files will be coming across the wire, I want to optimize the retrieval. I believe seeking and reading the "new portion" since the last refresh will help. In testing this theory, I immediately noticed that I have another problem: displaying 190,000 lines in a textbox (txt.Text = LargeDataString) takes about 16 seconds, which seems a bit slow. In fact, adding just one line to that textbox takes an additional 16 seconds (txt.Text = txt.Text + vbcrlf + "additional line". Adding 190,000 entries to a listview: disaster! Forget it!
I had hoped to support indivual columns, but at this point I can live with a text box-like control if I can find one that's faster. Does anyone have any recommendations? Perhaps a virtual grid or something? Is there a free virtual grid out there? I don't think the data grid out of the box supports that.
Thanks.
|
|
|
|
|
I'm thying to find a range between two times. if the system time is within this time then error. Can any one help me in the coding to find the range?
silver-gray
|
|
|
|
|
|
I am having difficulty getting the underlying SQL data to update when a change is made to the datagrid. The change is made using a combobox, and allows the proper selection of 1 of the 3 choices, but I can't seem to get the syntax/code right to update the table. Here is my current code:
Public Sub comboControl_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles comboControl.SelectedValueChanged
grdVW_AllOpen(hitTestGrid.Row, hitTestGrid.Column) = comboControl.Text
Dim sc1 As New SqlCommand
Dim sCnnStr As String
sCnnStr = "Data Source=" & SQL_SERVER & ";Initial Catalog=" & DATABASE & ";User id=" & USER_ID & ";Password=" & PWD
Dim sqlConn As New SqlConnection(sCnnStr)
sc1.Connection = sqlConn
sc1.CommandType = CommandType.Text
sc1.CommandText = "UPDATE dbo.Chits_Backup SET Status = '" & comboControl.Text & "'" & ", LastName = @LastName, FirstName = @FirstName, DateofRequest = @DateofRequest, FromDate = @FromDate, ToDate = @ToDate, Days = @Days, NatureofRequest = @NatureofRequest WHERE ID = @ID"
Dim cmd As New SqlClient.SqlCommand(sc1.CommandText)
'Create the sql command object and set its command type to execute the sql query to get the results
sc1.Parameters.Add("@Status", SqlDbType.NVarChar, 50, "Status").Value = comboControl.Text
sc1.Parameters.Add("@LastName", SqlDbType.NVarChar, 50, "LastName").Value = "@LastName"
sc1.Parameters.Add("@FirstName", SqlDbType.NVarChar, 50, "FirstName").Value = "@FirstName"
sc1.Parameters.Add("@DateofRequest", SqlDbType.NVarChar, 50, "DateofRequest").Value = "@DateofRequest"
sc1.Parameters.Add("@FromDate", SqlDbType.DateTime, 8, "FromDate").Value = "@FromDate"
sc1.Parameters.Add("@ToDate", SqlDbType.DateTime, 8, "ToDate").Value = "@ToDate"
sc1.Parameters.Add("@Days", SqlDbType.NVarChar, 50, "Days").Value = "@Days"
sc1.Parameters.Add("@NatureofRequest", SqlDbType.NVarChar, 50, "NatureofRequest").Value = "@NatureofRequest"
Dim myParm2 As SqlParameter = sc1.Parameters.Add("@ID", SqlDbType.Int, 4, "ID")
myParm2.SourceVersion = DataRowVersion.Original
sqlConn.Open()
Try
sc1.ExecuteNonQuery()
Catch ex As SqlException
MsgBox(ex.Message().ToString())
End Try
sqlConn.Close()
I know it has to do with the handling of variables, but can't narrow it down.
Thank you,
LWhite
LWhite
|
|
|
|
|
could anyone help me using which method i've to access a database in other system in the network.?
My project is Seat allocation in a movie theatre.i like to inform you that this is not an online reservation. There will be five systems(LAN) in which the application will be installed and a database will reside on any one of the system. The database will be placed in anyone could anyone of these five systems. so that the application has to access the database in the other system which is in network.
could anyone help me with a suitable method ?
and also give me suggestions about this project if u have.
Hariram
-- modified at 12:54 Wednesday 20th September, 2006
|
|
|
|
|
Sounds to me like you need to configure ODBC on these machines to use the networked database. You place the database in a shared location and map the connection string to it.
Is that what you are looking for or do you need more detail. You can search MSDN for ODBC database connections and there is a ton of sample code!
cheers~
David
You are only as good as your last project.
|
|
|
|
|
An Access database is file-based. This means that whichever machine is going to host the database, it will have to Share a folder that contains the database so the other machines can get at it, usually by mapping a drive letter to the share on the server machine.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks you very much for yoursolution sir...
|
|
|
|
|
you can create a dll which can read your own type of file or a common data base sort of and store information about different servers and the connection paramaters
Belive me it works i have connected different types of forms through different databases with one common file as a connection manager.
You can even store information based on the user's accessibility and needs dynamically
|
|
|
|
|
Thanks you very much for your solution sir...
But i cant understand clearly. could you elaborate detaily(if you dont mind)...
Hariram
|
|
|
|
|
how do I assign a the columns of my datatable to a variable.
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
They already are a variable, there's a columns collection on the datatable.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm always trying to improve my code. In past programs, using VS 2003 when I had a windows form application with a button setup to allow the client access to a website, I would code the click event with the following:
System.Diagnostics.Process.Start("http://www.somewebsite.com")
This code works fine, but now I'm using VS 2005 and there has to be a better more efficient way of rewriting this code.
Any help is appreciated.
Lost in the vast sea of .NET
|
|
|
|
|
KreativeKai wrote: This code works fine, but now I'm using VS 2005 and there has to be a better more efficient way of rewriting this code.
Why?
Under 2005, it's exactly the same code. There is no alternative thats "better".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|