Multi user Application


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: Multi user Application

  1. #1
    Join Date
    Apr 2004
    Posts
    134

    Multi user Application

    Hi,

    I have finished coding a VB.Net application that has connection to SQL Express 2008 database. My question is, what steps do I have to take to make this a multi user application.

    FYI:
    There are 3 tables in the database of which two tables contain data to be viewed by the user and one table is to insert records by the user. The former two tables will be edited by the administrator only. So there is no issue of concurrency. But the one table that is used to insert records by all users has to be dealt with. Please give me suggessions as to how I should go about it.

    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    How are you connecting to the database? Are you using a Dataset? A BindingSource? Or some other method?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Apr 2004
    Posts
    134
    I have given a connection string in the application settings, so that in future I can change the location if there is any.

    Thanks

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Is your originial question resolved or do you still have open issues with this?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  5. #5
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    I'm sorry, I didn't mean to ask how you are connecting to the database, I meant what method are you using to retrieve and insert data?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  6. #6
    Join Date
    Apr 2004
    Posts
    134
    I'm using SQL INSERT method to add records to the table and SELECT method to retrieve from the table.

    Thanks

  7. #7
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Which .NET classes are you using to send the SQL statements? SqlDataReader or Dataset?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  8. #8
    Join Date
    Apr 2004
    Posts
    134
    This is the code I have written.


    Code:
    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
            Dim cnSQL As SqlConnection
            Dim cmSQL As SqlCommand
            Dim strSQL As String
            Dim iRow As Integer
            Dim temp As Integer
    
            For iRow = 0 To grdDetails.Rows.Count - 1
                If Not grdDetails.Rows(iRow).IsNewRow Then
                    Try
                        strSQL = "INSERT INTO Details VALUES ('" & Today() & "', '" & lblUser.Text & "', '" & _
                                Trim(cboDept.Text) & "', " & Trim(cboRFS.Text) & ", '" & Trim(cboCharge.Text) & _
                                "', '" & txtCharge.Text & "', '" & txtPurp.Text & "', '" & _
                                grdDetails.Rows(iRow).Cells("colFiles").Value & _
                                "', '" & grdDetails.Rows(iRow).Cells("colSize").Value & "', '" & _
                                grdDetails.CurrentRow.Cells("colType").Value & "', " & _
                                grdDetails.Rows(iRow).Cells("colPrints").Value & ", " & _
                                grdDetails.Rows(iRow).Cells("colTCost").Value & ", '" & _
                                grdDetails.Rows(iRow).Cells("colManual").Value & "', '" & txtCmnts.Text & "')"
    
                        cnSQL = New SqlConnection(My.Settings("sqlCon"))
                        cnSQL.Open()
    
                        cmSQL = New SqlCommand(strSQL, cnSQL)
                        cmSQL.ExecuteNonQuery()
    
                        cnSQL.Close()
                        cmSQL.Dispose()
                        cnSQL.Dispose()
    
                    Catch ex As Exception
                        Throw ex
                    End Try
                Else
                    temp = temp + 1
                End If
            Next
    
            If temp > 0 Then
                iRow = iRow - temp
            End If
            MsgBox(iRow & " requests added.")
    
        End Sub

  9. #9
    Join Date
    Sep 2008
    Posts
    86
    are users only able to INSERT into this one table, or can they edit the data of this one table also?

Similar Threads

  1. Replies: 0
    Last Post: 03-05-2007, 05:56 AM
  2. Replies: 2
    Last Post: 01-04-2007, 01:48 PM
  3. Replies: 3
    Last Post: 10-26-2006, 01:35 AM
  4. C# User application
    By MGunawan in forum .NET
    Replies: 0
    Last Post: 04-29-2005, 11:53 PM
  5. Replies: 1
    Last Post: 12-04-2002, 03:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center