-
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
-
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!
-
I have given a connection string in the application settings, so that in future I can change the location if there is any.
Thanks
-
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
-
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!
-
I'm using SQL INSERT method to add records to the table and SELECT method to retrieve from the table.
Thanks
-
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!
-
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
-
are users only able to INSERT into this one table, or can they edit the data of this one table also?
Similar Threads
-
By robinp in forum ASP.NET
Replies: 0
Last Post: 03-05-2007, 04:56 AM
-
By Matrix.net in forum .NET
Replies: 2
Last Post: 01-04-2007, 12:48 PM
-
Replies: 3
Last Post: 10-26-2006, 12:35 AM
-
By MGunawan in forum .NET
Replies: 0
Last Post: 04-29-2005, 10:53 PM
-
By krishna in forum VB Classic
Replies: 1
Last Post: 12-04-2002, 02: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
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks