Help needed, SQL Express and multiple users

  • Hello,

    I am hoping that someone can help me with this. I am a web developer and was asked to create a order system. I decided to learn something new and used visual basic with sql express.

    I have it completed and it works great. The thing that is needed is for about 10 users to use this program installed on seperate machines, but sharing one database that is located on the network.

    I was able to start SQL express with -T1807 and allow the database to be accessed over the internet.

    The problem that I am now facing is that only one user (program) can access the database at any given time. Any help to point me in the right direction would be greatly appreciated.

    Here is my connection string:

    <add name="tapeworks.My.MySettings.tapeworksConnectionString"

    connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="\\66.207.206.211\e$\tapeworks\tapeworks.mdf";Integrated Security=True;Connect Timeout=30;User Instance=False"

    providerName="System.Data.SqlClient" />

    Here is the error that I receive:

    System.Data.SqlClient.SqlException: Unable to open the physical file "\\cpost-bvgm\users\tapeworksorder\tapeworks.mdf". Operating system error 5: "5(Access is denied.)".

    Unable to open the physical file "\\cpost-bvgm\users\tapeworksorder\tapeworks_log.ldf". Operating system error 5: "5(Access is denied.)".

    Cannot open user default database. Login failed.

    Login failed for user 'CPOST\lcox'.

    File activation failure. The physical file name "\\cpost-bvgm\users\tapeworksorder\tapeworks_log.ldf" may be incorrect.

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)

    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)

    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)

    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)

    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)

    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)

    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)

    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)

    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

    at System.Data.SqlClient.SqlConnection.Open()

    at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)

    at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)

    at tapeworks.tapeworksDataSet2TableAdapters.tOrderProductDetailsTableAdapter.Fill(tOrderProductDetailsDataTable dataTable)

    at tapeworks.Form1.Form1_Load(Object sender, EventArgs e)

    at System.EventHandler.Invoke(Object sender, EventArgs e)

    at System.Windows.Forms.Form.OnLoad(EventArgs e)

    at System.Windows.Forms.Form.OnCreateControl()

    at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

    at System.Windows.Forms.Control.CreateControl()

    at System.Windows.Forms.Control.WmShowWindow(Message& m)

    at System.Windows.Forms.Control.WndProc(Message& m)

    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

    at System.Windows.Forms.ContainerControl.WndProc(Message& m)

    at System.Windows.Forms.Form.WmShowWindow(Message& m)

    at System.Windows.Forms.Form.WndProc(Message& m)

    at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)

    at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

    at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

  • I was to able to set this up and get it working.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply