Advertisement

04.29.2008 at 06:47AM PDT, ID: 23361983
[x]
Attachment Details

Unable to store data in MS SQL Express Db

Asked by alk10 in VB Database Programming, Microsoft Access Database, Visual Basic Programming

Tags: ,

I develop in Access VBA and am learning VB in Visual Studio.  I am trying to create a very simple web page where a user enters some data and it gets stored in a table in SQL Server Express.  I can't get the latter part to work.

I'm getting the following error:

Unable to open the physical file "C:\WebSites\IOC\App_Data\IOC_Data.mdf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
Unable to open the physical file "C:\WebSites\IOC\App_Data\IOC_Data_log.ldf". Operating system error 32: "32(The process cannot access the file because it is being used by another process.)".
Cannot open database "IOC_Data" requested by the login. The login failed.
Login failed for user 'DELL5150\Al'.
File activation failure. The physical file name "C:\WebSites\IOC\App_Data\IOC_Data_log.ldf" may be incorrect.

From the line below:         mySqlDataAdapter.Fill(myDataSet, "tblIOC_Data")

'-----------------------------------------------------------
 ' Create a new Connection and SqlDataAdapter
        Dim myConnection As Data.SqlClient.SqlConnection
        Dim mySqlDataAdapter As Data.SqlClient.SqlDataAdapter

        myConnection = New Data.SqlClient.SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=IOC_Data;Data Source=DELL5150\SQLEXPRESS")
        mySqlDataAdapter = New Data.SqlClient.SqlDataAdapter("Select * from tblIOC_Data", myConnection)

        Dim myDataSet As Data.DataSet = New Data.DataSet()
        Dim myDataRow As Data.DataRow

        Dim myDataRowsCommandBuilder As Data.SqlClient.SqlCommandBuilder = New Data.SqlClient.SqlCommandBuilder(mySqlDataAdapter)

        mySqlDataAdapter.Fill(myDataSet, "tblIOC_Data")

        myDataRow = myDataSet.Tables("tblIOC_Data").NewRow()
        myDataRow("IOC_ID") = 1
        myDataRow("DateEntered") = txtDate.Text
        myDataRow("DiningCenter") = cboDiningCenter.Text
        myDataRow("DC_Coordinator") = txtDC_Coordinator.Text

        myDataSet.Tables("tblIOC_Data").Rows.Add(myDataRow)

Any help is greatly appreciated.
Thank you.Start Free Trial
 
 
[+][-]05.01.2008 at 12:07AM PDT, ID: 21476915

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 12:09AM PDT, ID: 21476922

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 05:19AM PDT, ID: 21477924

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 07:13AM PDT, ID: 21478756

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 07:15AM PDT, ID: 21478788

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 07:55AM PDT, ID: 21479200

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.01.2008 at 06:48PM PDT, ID: 21484049

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 07:03AM PDT, ID: 21486715

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 07:36AM PDT, ID: 21486985

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 08:13AM PDT, ID: 21487294

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.02.2008 at 09:46AM PDT, ID: 21488144

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Database Programming, Microsoft Access Database, Visual Basic Programming
Tags: Microsoft, VB/Visual Studio 2005 & MS SQL Express 2005
Sign Up Now!
Solution Provided By: Rahu_ketu_patal
Participating Experts: 3
Solution Grade: B
 
 
[+][-]05.05.2008 at 08:31AM PDT, ID: 21500725

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.05.2008 at 08:50AM PDT, ID: 21500870

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628