Begginnerdev 256 Junior Poster

Change the for statement to say:

For Each f As File In FTPDownload.ListDirectory

Then reference f.

The problem is that you are refrenceing a class File that has not been instantiated.

Begginnerdev 256 Junior Poster

After a quick google search I found this.

Begginnerdev 256 Junior Poster

I took us a good week to iron out all of the problems.

That mde has been phased out though. We replaced it with a .net application 4 months later.

Begginnerdev 256 Junior Poster

I have not used blobs personally, but here is an article.

I hope it helps!

Begginnerdev 256 Junior Poster

Would something like this work:

FormatNumber(CInt(1000 + 2.6 + 3.5)), 2)

Just let the framework do the formatting for you.

Begginnerdev 256 Junior Poster

Here is a decent article on Windows services.

As for as deployement, does 2013 include ClickOnce?

Begginnerdev 256 Junior Poster

My guess would be this statement:

.Rows.Add(table.Rows(i)("frmStudentReg.regno"), table.Rows(i)("nursery.rollno"), table.Rows(i)("nursery.nepali(writing)"), table.Rows(i)("nursery.nepali(oral)"), table.Rows(i)("nursery.maths(writing1)"), table.Rows(i)("nursery.maths(oral)"), table.Rows(i)("nursery.maths(writing2)"), table.Rows(i)("nursery.english(writing)"), table.Rows(i)("nursery.english(oral)"), table.Rows(i)("nursery.physical_edu(oral)"), table.Rows(i)("nursery.creative(oral)"))

You need to set column values and I don't think the Rows.Add method allows that.

Something like this would work:

With DataGridView1
    Dim dgvr As New DataGridViewRow
        'add cells/values
    DataGridView1.Rows.Add(dgvr)
End With
Begginnerdev 256 Junior Poster

You could use a ComboBox control with the autocomplete items filled with your names. Then, as the users type into the box, a drop down will appear with the possible names. (Make use of the comobox's SelectedValueChanged event.

For example:

Private Sub FillComboBox(ByVal dt As DataTable)
    Try
        'Clear the combobox
        ComboBox1.Items.Clear()

        'Fill the lookup as well
        Dim acSC As New AutoCompleteStringCollection

        If dt.Rows.Count > 0 Then
            For Each dr As DataRow In dt.Rows
                ComboBox1.Items.Add(dr("Name")) 'Place the name of the 'NameColumn' from the database inside the quotes.
                acSC.Add(dr("Name")) 'Same here
            Next

            With ComboBox1
                .AutoCompleteCustomSource = acSC
                .AutoCompleteMode = AutoCompleteMode.SuggestAppend
            End With
        End If
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
Begginnerdev 256 Junior Poster

You will need to retreive items from the database and store them in a DataSet/DataTable or read them with a DataReader.

Are you wanting a local version of your data? (For editing and pushing back out to the db)

Or are you wanting the application to read data only?

Begginnerdev 256 Junior Poster

We had to upgrade from 10.0 to 12.0 when we upgraded. We are doing some basic inserting/deleting from table and running some queries.

As far as provider, is it a connection string problem?

See here.

Begginnerdev 256 Junior Poster

Have you tried using the Me.Load event instead to see what happens?

Begginnerdev 256 Junior Poster

There are quite a few issues with 2000 > 2007, but with 2003 we only had a few missing controls some forms in an MDE application.

We lost small stuff like a drop-down calendar and a text box off of another form.

Here is a decent article you can read as well.

Begginnerdev 256 Junior Poster

The webpage that you see is a click once deployment page giving you a summary of the application and an install button correct?

You can turn the page off in the My Project > Deployement > Options > Deployement dialog.

See if this fixes your problem.

Begginnerdev 256 Junior Poster

You will need to look at a reporting solution.

Two major solutions exist.

Microsoft Report Viewer

Crystal Reports

Begginnerdev 256 Junior Poster

Copy the files to a directory in the solution of your project.

Then include the directory with the publish.

When looking at the solution explorer, add a folder.

Once you have added and named the folder, right click and click add existing item.

Set the filter of the dialog to any file type, navigate to the items, and click them, and press add.

Begginnerdev 256 Junior Poster

You will have to program on the ComboBox's SelectedIndexChanged event and fire the code then.

You will have to retreive the value from the database and post it to the textbox.

For example:

Private Sub combItems_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles combItems.SelectedIndexChanged
    Try
        Query = "SELECT itemStock FROM tbl_items WHERE itemName='{0}'"
        String.Format(Query,TryCast(sender,ComboBox).SelectedItem.Text)
        MySqlCommand = New MySqlCommand(Query, CNN)
        MySqlDataReader = MySqlCommand.ExecuteReader

        Do While MySqlDataReader.Read
            TextBox1.Text = MySqlDataReader(0)
        Loop
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
Begginnerdev 256 Junior Poster

The code:

Dim rowcnt As Integer = (dtOrder.Rows.Count - 1)
For x = 0 To rowcnt
    If IsNumeric((dtOrder.Rows(x)(3).ToString)) Then
    val = CInt(dtOrder.Rows(x)(3).ToString)
        With fractColumn
            .ColumnName = "xttl"
            .Expression = ((dlgNewTop.Dec2Frac(val, 2)))
        End With
    End If  
Next

 With dtOrder.Columns
     .Add(fractColumn)
 End With

Will only add the last because that is the only row you are telling it to add.

This code is outside the for:

 With dtOrder.Columns
     .Add(fractColumn)
 End With

Therefore, the only value added would be the last value it sees. (The value of the column from the last row of dtOrders)

Try This instead:

For x = 0 to dtOrder.Rows.Count - 1
 If IsNumeric((dtOrder.Rows(x)(3).ToString)) Then
    val = CInt(dtOrder.Rows(x)(3).ToString)
        With fractColumn
            .ColumnName = "xttl"
            .Expression = ((dlgNewTop.Dec2Frac(val, 2)))
        End With
    End If 

    With dtOrder.Columns
     .Add(fractColumn)
    End With
Next
Begginnerdev 256 Junior Poster

Your select statement for your datagridview can be edited to order by the column chosen.

For example:

"SELECT * FROM Table ORDER BY Column4 ASC"

Will sort data by column for ascending.

For decending just do the opposite:

"SELECT * FROM Table ORDER BY Column4 DESC"
Begginnerdev 256 Junior Poster

Change this:

ds.Tables("FamilieNummer")

To This:

ds.Tables("Max")

You are filling a table called "Max" but searching for a table called FamilieNummer.
Remember that the data set is in memory, not in database.

I am sorry to hear about health problems. I hope everything is okay!

Begginnerdev 256 Junior Poster

You need to look into using forms authentication in asp.net

Please read this.

Begginnerdev 256 Junior Poster

Not quite sure what you plan to acheive with that syntax.

If you are trying to format the output, read this.

Begginnerdev 256 Junior Poster

Have you checked the code snipped posted here?

Begginnerdev 256 Junior Poster

You are wanting to save a .csv file or a MySQL proprietary file?

Begginnerdev 256 Junior Poster

I think this statement would be the culprit:

.numberofstudents = Group.Count()

But my LINQ is shoddy at best. :(

Begginnerdev 256 Junior Poster

One possible problem ( that I've had with CR ) could be that the report was built on a 64bit CR machine, and published. We had to make sure it was a 32bit machine to fix our problem.

It did the same, timed out on pull, but pulled fine in GUI.

Begginnerdev 256 Junior Poster

The font constructor requires a font size. (Em Size)

Begginnerdev 256 Junior Poster

What error is the installation giving you?

Begginnerdev 256 Junior Poster

Something like this might help:

Private Sub WriteToProgressBar(ByVal pbIn As ProgressBar, ByVal sTextToDraw As String, ByVal f As Font, ByVal b As Brush)
    Try
        Using g As Graphics = Me.CreateGraphics
            'Check to see if text is to wide/tall
            If sTextToDraw.Length * f.Size > pbIn.Width Or _
               f.Height > pbIn.Height Then
                Throw New ArgumentException("Text is to large for progress bar!")
            Else
                Dim iTryGetCenterW As Integer = (pbIn.Width / 2) - ((sTextToDraw.Length * f.Size) / 2)
                Dim iTryGetCenterH As Integer = (pbIn.Height / 2) - (f.Size / 2)
                g.DrawString(sTextToDraw, f, b, New Point(iTryGetCenterW, iTryGetCenterH))
            End If
        End Using
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub

You will have to take the progress bar's location into consideration as well.
But you must take the progress bar's location into consideration.

Begginnerdev 256 Junior Poster

I am not so sure about the legitimacy of the email lookup @ pwndlist.

After typing:

a@a.a
b@b.b
c@c.c

All of the address returned N occurrences since July, 2011
All of the address had been compromised 4 months ago.

Begginnerdev 256 Junior Poster

VB.NET doesnt support transparent labels. You will have to draw the text over it using the Graphics.DrawString or some kind of custom control.

Microsoft decided that we didn't need this function. >(

You can use transparent panels and such, but when you set them to transparent - the label will still have a boarder around your text.

Begginnerdev 256 Junior Poster

The question would be then, is it a problem with #3?

Have you looked at your SQL statements to see if it is causing the service to time out?

Ie. alot of inner joins,table creations, or any cpu hog procedures?

Begginnerdev 256 Junior Poster

I have had problems with this using SSRS (SQL Server Reporting Services) and it turns out that it is a process that terminates and must be restarted to pull a report.

The workaround that I had found is here.

The first pull starts the process/freezes , and the second pull is fine correct?

Begginnerdev 256 Junior Poster

127.0.0.1 is not a valid IP address to communicate over the network.
It is the home address.

You will need the IP address of your host terminal, as pritaeas said.

With the satement of you working on this project at a university brings up a few questions.

Does the univerisity use DNS?
If not is the terminal IP static, or on a 24 hour lease?

If the IP is not static, then you will have to change it every time the machine does not lease the same IP.

The DNS on the other hand, would remain constant (with exceptions)

Begginnerdev 256 Junior Poster

You will have to post a new question in the C# forums.
This is a vb.net forum.

The Daniweb rules also state that you can not thread hijack. So, please don't do this.

You can read the rules HERE.

Begginnerdev 256 Junior Poster

After a quck google search, I assume that you mean HP Quick Test Professional.

I have found an article saying that integration with vb.net is impossible and you should be using vbscript.

All of this is severely lacking context.

What do you mean by QTP and do you have any code thus far?

Begginnerdev 256 Junior Poster

If you are only wanting to increase the width (on the left) you will have to reposition the panel on resize to give the user the illusion it is only increasing the width on the left.

For exmaple:

Do While Panel1.Width < 730
    Panel1>Width += 1
    Panel1.Location = New Point(Panel1.Location.X - 1, Panel1>Location.Y)
Loop
Begginnerdev 256 Junior Poster

When you say sliding the panel, do you mean in the parent control or the scroll bar of the panel?

Begginnerdev 256 Junior Poster

You should look at using the ComboBox_SelectedIndexChanged event.

This can be handled like so:

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ComboBox1.SelectedIndexChanged
    Try
        TextBox1.Text = ComboBox1.SelectedValue
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
Begginnerdev 256 Junior Poster

If the cell is empty the Value property will be null;

Change

IIf(IsNothing(DataGridView2.Rows(i).Cells(3).Value.ToString), String.Empty, DataGridView2.Rows(i).Cells(3).Value.ToString)

To

IIf(IsNothing(DataGridView2.Rows(i).Cells(3)), String.Empty, DataGridView2.Rows(i).Cells(3).Value.ToString)

As for the connection string, you have to place the string inside the constructor of the connection.

As for the snippet you posted, the connection being passed in to the DataAdapter is not the same connection you are declaring.

Begginnerdev 256 Junior Poster

You should replace MyOleDBConnection with the name of your connection.

For instance:

Dim MyOleDBConnection As New OleDBConnection("ConnectionStringHere")
Begginnerdev 256 Junior Poster

Stored as in where are you keeping track of these students?

Are you storing them in a table, workbook, or just creating random numbers?

Begginnerdev 256 Junior Poster

You could pass the values into a DataAdapter instead of using a string based method.

This would safeguard against SQL Injection attacks, and add some cushion for errors.

Private Sub Insert()
    Dim da As New OleDBDataAdapter("SELECT * FROM nursery WHERE 1=2", MyOleDBConnection)
    Dim ds As New DataSet
    Try
        da.Fill(ds, "Nursery") 'This will get table structure without data.

        If Not IsNothing(ds.Tables("Nursery")) Then
            For Each r As DataGridViewRow In DataGridView1.Rows
                Dim dr As DataRow = ds.Tables("Nursery").Rows.Add

                dr("regno") = IIf(Not IsNothing(r.Cells(1).Value.ToString), DBNull.Value, CInt(r.Cells(1).Value.ToString))
                dr("rollno") = IIf(Not IsNothing(r.Cells(2).Value.ToString), DBNull.Value, r.Cells(2).Value.ToString)
                dr("nepali") = IIf(Not IsNothing(r.Cells(3).Value.ToString), DBNull.Value, r.Cells(3).Value.ToString)
                dr("com_english_w") = IIf(Not IsNothing(r.Cells(4).Value.ToString), DBNull.Value, r.Cells(4).Value.ToString)
                dr("com_english_o") = IIf(Not IsNothing(r.Cells(5).Value.ToString), DBNull.Value, r.Cells(5).Value.ToString)
                dr("com_math") = IIf(Not IsNothing(r.Cells(6).Value.ToString), DBNull.Value, r.Cells(6).Value.ToString)
                dr("social_w") = IIf(Not IsNothing(r.Cells(7).Value.ToString), DBNull.Value, r.Cells(7).Value.ToString)
                dr("social_o") = IIf(Not IsNothing(r.Cells(8).Value.ToString), DBNull.Value, r.Cells(8).Value.ToString)
                dr("science_w") = IIf(Not IsNothing(r.Cells(9).Value.ToString), DBNull.Value, r.Cells(9).Value.ToString)
                dr("science_o") = IIf(Not IsNothing(r.Cells(10).Value.ToString), DBNull.Value, r.Cells(10).Value.ToString)
                dr("hpe_w") = IIf(Not IsNothing(r.Cells(11).Value.ToString), DBNull.Value, r.Cells(11).Value.ToString)
                dr("hpe_o") = IIf(Not IsNothing(r.Cells(12).Value.ToString), DBNull.Value, r.Cells(12).Value.ToString)
                dr("creative") = IIf(Not IsNothing(r.Cells(13).Value.ToString), DBNull.Value, r.Cells(13).Value.ToString)
                dr("health") = IIf(Not IsNothing(r.Cells(14).Value.ToString), DBNull.Value, r.Cells(14).Value.ToString)
                dr("extra_math") = IIf(Not IsNothing(r.Cells(15).Value.ToString), DBNull.Value, r.Cells(15).Value.ToString)
                dr("extra_eng_w") = IIf(Not IsNothing(r.Cells(16).Value.ToString), DBNull.Value, r.Cells(16).Value.ToString)
                dr("extra_eng_o") = IIf(Not IsNothing(r.Cells(17).Value.ToString), DBNull.Value, r.Cells(17).Value.ToString)
            Next

            da.InsertCommand = New OleDbCommandBuilder(da).GetInsertCommand
            da.Update(ds)

            MsgBox("Insert successful!")
        Else
            MsgBox("Table not retreived!")
        End If
    Catch ex As Exception
        MsgBox(ex.ToString)
    Finally
        da = Nothing
        ds = Nothing
    End Try
End Sub
Begginnerdev 256 Junior Poster

Are both clients connected to the same database, or are you both working on two different applications?

Begginnerdev 256 Junior Poster

First off, you never said how you store the student count. We can't see where this is being stored, so we can't fully help you with your desired format.

Second off, the String.Format statement is incorrect, you would be passing in PaperNo 5 and would get:

5 : 5

As an outcome

The String.Format documentation can be found here.

Begginnerdev 256 Junior Poster

You can try wrapping the columns in IIFs.

For example:

IFF(IsNothing(DataGridView2.Rows(i).Cells(2).Value.ToString) Or DataGridView2.Rows(i).Cells(2).Value.ToString = String.Empty, String.Empty, DataGridView2.Rows(i).Cells(2).Value.ToString)

The IIF qualifies the statement then pulls the value given.
In this example would be the equivilent of:

IF IsNothing(DataGridView2.Rows(i).Cells(2).Value.ToString)) Or DataGridView2.Rows(i).Cells(2).Value.ToString = String.Empty Then
    row2 = String.Empty
Else
    row2 = DataGridView2.Rows(i).Cells(2).Value.ToString
End If

A true value should be failsafe like String.Empty or 0.
A false value should be the actual column.

Just a note though, if you WANT null values passed to the database use:

row2 = DBNull.Value

You can read more about this function here.

Begginnerdev 256 Junior Poster

You can check per column basis:

For example:

  Dim Found As Boolean
  For Each r As DataRow In dt.Rows
      Found = False
      For i = 0 To dt.Columns.Count
          If r(i) = "ThisValue" Then
              Found = True
              Exit For
          End If
      Next
      If Found Then Exit For
  Next

Also, I have posted another solution on your other post.

Begginnerdev 256 Junior Poster

A quick google search returned a few things.

One being permissions the other being this.

Begginnerdev 256 Junior Poster

I think you can access the Application directory using:

My.Computer.FileSystem.SpecialDirectories

Then use the directory you wish.

If you are wanting to work with the current user just simply use:

My.Computer.FileSystem.SpecialDirectories.CurrentUserApplicationData

To save alot of coding.

Begginnerdev 256 Junior Poster

Can you please post the code being used to connect to the database?

Also, you might want to read this article.

Begginnerdev 256 Junior Poster

The correct syntax would be:

"SELECT SEGDATA.AdminNo, PapersList.PaperNo FROM SEGDATA,PapersList WHERE SEGDATA.ModuleCode = PapersList.Module1"

This will return all of the records that match.

This will be in the format you want.

You can also add the DISTINCT clause for filtering duplicates.

As for the PapersList Table, you could try using one ModuleCode column with MAX length.

Then you could have more than 9 codes per paper number.

For example

|ModuleCodes|
|EG1003;EG1001;EG1201;EG1092|

Then you could parse the field for the value by splitting on ";" or just tell SQL to get the value with the LIKE Clause.