Pgmer 50 Master Poster Featured Poster

You need to run the installer files to Install VS2008 and SQL 2005. You can install anyone first. They are independent.

Pgmer 50 Master Poster Featured Poster

Till now how far you wrote code for this? You want someone to write code for you?

Pgmer 50 Master Poster Featured Poster

May be your declaring again in ServerConnection() as Dim conn = New SqlConnection(con)
in top also there is a variable with scope public and here its local to that module.

Pgmer 50 Master Poster Featured Poster

What is the problem with above code?

Pgmer 50 Master Poster Featured Poster

Can you put a break point and check what is happening when da.fill(dt)? Whats coming into dt? is it blank?

Pgmer 50 Master Poster Featured Poster

Its better get the resluts from DB once into one datatable and bind it.

Pgmer 50 Master Poster Featured Poster

Good but still you can post the code.. it may help any who needs this.. And mark the thread as solved

Pgmer 50 Master Poster Featured Poster

please show us the code what you have sofar for reading the text file

Pgmer 50 Master Poster Featured Poster

Then please mark this thread as solved.

Pgmer 50 Master Poster Featured Poster

this should give you hint.Click Here

Pgmer 50 Master Poster Featured Poster

you mean you want the complete code? or just an idea?

Pgmer 50 Master Poster Featured Poster

please post your Query . I mean your final sqlstr.. And one thing i noticed is line number 13 is having 2 times SET key word

Pgmer 50 Master Poster Featured Poster

you need to write a program to read excel file using .net and use the same application to write back into another excel.

Pgmer 50 Master Poster Featured Poster

Check before cmd.executeNonQuery on

ds.Tables(0).Rows(iRows).Item(5) & "," &                                     
ds.Tables(0).Rows(iRows).Item(6) & "

What ur getting at these items...

Pgmer 50 Master Poster Featured Poster

U need to add the item to ur dt before setting the data and value member. or Edit ur Query to select All region as first item

Pgmer 50 Master Poster Featured Poster

Try somethong like this

   Dim cmd As New SqlCommand
        Dim ds As New DataSet
        Dim da As New SqlDataAdapter
        Dim conn As New SqlConnection("Ur connection")


        With cmd
            .Connection = conn
            .CommandTimeout = 3000
            .CommandType = CommandType.text
            .CommandText = "SQL code"

        End With

        da = New SqlDataAdapter
        da.SelectCommand = cmd

        ds = New DataSet
        da.Fill(ds)
Pgmer 50 Master Poster Featured Poster

Before starting the loop Can you just check DS is having tables and Rows?
And I am not sure about this line "For iX = 0 To dtRows - 1" your looping through dtrows and accessing values from dataset. Will dtRows have same number of rows as table of DS?

Begginnerdev commented: Good catch +5
Pgmer 50 Master Poster Featured Poster

Try Declare ds as new in public declaration or instantiate again in the sub where ur using the DS. If you instantiate it will be a new dataset you will loose the data in it.

Pgmer 50 Master Poster Featured Poster

You selected the project type as ClassLibrary? What did not work for you?

Pgmer 50 Master Poster Featured Poster

Yes.. I agree. It might take some time to rewrite but its worth. You can identify which piece of code you dont need module wise and start writing in better way. No tool can simply converts vb6 to vb.net.

Pgmer 50 Master Poster Featured Poster

You can call the web page in webbrowser control by passing the URL.. See more about webbrowser control in net.

Pgmer 50 Master Poster Featured Poster

Are you using any database? If yes Then have a unique column in DB and get the values from DB anad attach to grid view column.

Pgmer 50 Master Poster Featured Poster

And also please Mark the thread as solved.

Pgmer 50 Master Poster Featured Poster

think you cant do it programatically.

Pgmer 50 Master Poster Featured Poster

Can you post ur updated code? Have u tried to take the insert statement from values variable and running it in SQL server?

Pgmer 50 Master Poster Featured Poster

Ur calling the another application within ur application?

Pgmer 50 Master Poster Featured Poster

Just try something like below.

 Private Sub test()
            Dim cntest As SqlConnection
            Dim strCnn As String = "ur Connection string"
            cntest = New SqlConnection(strCnn)
            cntest.Open()
            Try
                Dim cmdInsert As New SqlCommand
                cmdInsert.Connection = cntest
                Dim strCommandText As String = String.Empty
                Dim values As String = String.Empty
                strCommandText = "INSERT INTO TableName(COL1,COL2,COL3)VALUES("
                For Each row As DataGridViewRow In BOQSectionPartsDataGrid1.Rows

                    values = strCommandText & txtPTNO.Text & "," & row.Cells(0).Value.ToString & "," & row.Cells(1).Value.ToString & "'" & ")"
                    cmdInsert.CommandText = values
                    cmdInsert.ExecuteNonQuery()
                    values = ""
                Next
            Catch ex As Exception

            End Try
        End Sub
Pgmer 50 Master Poster Featured Poster

please post ur code. so that we can see where the problem is

Pgmer 50 Master Poster Featured Poster

U need to looptrhough each row of grid to get the values and prepare the insert statement and pass these values and execute the command.

Pgmer 50 Master Poster Featured Poster

U have asked same kind of question in one of your other thread. Dont you follow the answer?

Pgmer 50 Master Poster Featured Poster

What you mean by linked to?

Pgmer 50 Master Poster Featured Poster

show your code..

Pgmer 50 Master Poster Featured Poster

before rep.SetDataSource(d) have only those rows for which value is not 0. If your using any database you can do it in query or else you can remove the rows using dataview.rowfilter option.

Pgmer 50 Master Poster Featured Poster

Have application config file and mention your connection string. I hope your database is hosted on server and you know the server name and your application can ping to DB.

Pgmer 50 Master Poster Featured Poster

add 0 to FixSumPer if null using
IIf(IsDBNull(DataGridView1.Rows(i).Cells(9).Value), 0, DataGridView1.Rows(i).Cells(9).Value))

Pgmer 50 Master Poster Featured Poster

Then use the search condition in dataview using dataview.rowfilter method and bind the dataview back to grid.

Pgmer 50 Master Poster Featured Poster

You need to install framework in client system in which you developed ur application. You can even change the target framework in project proerty

Pgmer 50 Master Poster Featured Poster

On the server you tried to create virtual directory? What are your steps in deployement? See this link Click Here

Pgmer 50 Master Poster Featured Poster

You need to deploy that webservice into server

Pgmer 50 Master Poster Featured Poster

U need to set the activecell proerty or active row property to set the cursor

Pgmer 50 Master Poster Featured Poster

Using the rowindex. or get the number of rows in grid and select the last row

Pgmer 50 Master Poster Featured Poster

Listbox.items.removeat(Passtheindex) And writeback all the remaining lines to textfile again..

Pgmer 50 Master Poster Featured Poster

Using IO read the file in memory.. And add the line to text file using IO.File.Write and save the file..

Pgmer 50 Master Poster Featured Poster

Why you want to open in textbox? Try reading in moemory and add the site..

Pgmer 50 Master Poster Featured Poster

Please mark thread as solved.. :)

Pgmer 50 Master Poster Featured Poster

Making the form independent of resolution is difficult. That is why MS has brought in WPF. You can try using Layouts in form design.. Let us know if you get any sollution :)

Pgmer 50 Master Poster Featured Poster

This should work for you..

Private Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        If e.KeyCode = Keys.F3 Then
            TextBox1.Text = Now().Date.ToShortDateString()
        End If

    End Sub
Pgmer 50 Master Poster Featured Poster

Cant you prepare the Select statement with Joins and UNION at database side? And just get the result set what u need...

Pgmer 50 Master Poster Featured Poster

In keydown event my code works good for me... Why cant you try that code in keydown? Instead of messagebox you can write ur code what you want to do after user pressing F3 key...

Pgmer 50 Master Poster Featured Poster

Try
'All ur code goes here
Catch ex As Exception
' Cathc the error if any and show the user or log
End Try