Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8772091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:57:20+00:00 2026-06-13T17:57:20+00:00

UPDATE 2 I fixed the error by adding System.Configuration to the reference file. I

  • 0

UPDATE 2

I fixed the error by adding System.Configuration to the reference file. I had already added it to my class with using System.Configuration;
I found the answer here: The name ‘ConfigurationManager’ does not exist in the current context

Any further issues will be addressed in a new question.

Original(ish) Post

I have Microsoft SQL Server Management Studio. In the studio I created a database called Logbook that exists locally on my computer.

I have also created a user interface using a Windows forms application in VS C# Express. I would like to connect it to my logbook database in order to update, select, delete, and insert entries into the database through the UI.

However, I cannot figure out how connect the two. I have played around with the “Add new data source” wizard to no avail. I also cannot find anything helpful in the MSDN or other tutorials online.

UPDATE

I created a new database and project to work with until I figure out how to properly do this so I don’t accidently break anything in my project.
The Schema is:

Student(sid: int, fname: char(10), lname: char(10), age:int, major:char(10))
Course(cid:int, desc:char(50), dept:char(10))
Enrolled(sid:int, cid:int, quarter:char(10), grade:char(10))

Here is the connection string generated by the “Add Data Source” wizard

<add name="boathouseLogConnectionString"
        connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=&quot;C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\boathouseLog.mdf&quot;;Integrated Security=True;Connect Timeout=30;User Instance=True"
        providerName="System.Data.SqlClient" />

I have successfully gotten my database into the project. However, when I try running a stored procedure I get this error Argument Exception was unhandled. Format of the initialization string does not conform to specification starting at index 0.

The error occurs on line 2.

        DataTable dt = new DataTable();
        SqlConnection sqlConn = new SqlConnection(selectedConnectionString);
        SqlCommand myCommand = new SqlCommand("proc_getMember", sqlConn);
        myCommand.CommandType = CommandType.StoredProcedure;
        SqlDataAdapter da = new SqlDataAdapter(myCommand); 

the selectedConnectionString variable is set to boathouseLogConnectionString

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T17:57:21+00:00Added an answer on June 13, 2026 at 5:57 pm

    Initial Hints

    If you want to see some examples for windows forms connecting to a database i can recommend the forms over data video series. Video 2 is about how to connect to a database.

    In the app.config file you can put your connection data

    <connectionStrings>
        <add name="OrderManager.My.MySettings.OMSConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\OMS.mdf;Integrated Security=True;User Instance=True"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
    

    To be able to help you better i need more details. If you connect in management studio you can take a look at your connections properties. What are the values here and so on.

    Update

    There is another question with a similar problem. May be you are running user instances. Please add more details:

    • add information about your connection string (i am assuming your are using file attached connnections with a local data file)
    • where do you click on your database? Are you clicking on the mdf file or are you using management studio or visual studio
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE: Found the error to be related to the path. A literal path fixed
Update - I fixed the query below. I had the wrong query/error statement :(
Update: I've fixed up my referencing below, and my problem is now more specific.
UPDATE - I have fixed some mistakes in the code below and the images
Update: I reported this as a bug to Apple and they fixed it! All
Update: Switching to IIS Express instead of the Visual Studio Development Server fixed the
UPDATE It looks like this problem has been quietly fixed in iOS 4.3. Up
UPDATE 10 Secs later Fixed properly now, and thanks to JF and Gauden. UPDATE
When installing packages in Python using pip, I came across the following error: unable
EDIT: Modified title and added update. UPDATE : We no longer believe this is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.