.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

'Add project data source' database location?

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :

Hey guys,

So I'm having trouble browsing for my databases in the Data Source Connection Wizard in Visual C#.

Just so you know where I'm at, here are the steps I've taken so far.

-> I click on my datagridview DataSource property and choose 'add project data source'.

-> 'Choose Data Source Type' -> database -> next

-> 'Choose Database Model' -> dataset -> next

-> 'Choose Your Data Connection' -> New Connection

Now I'm required to browse or type in my database string in the connection properties section and I don't know where my databases are stored.

Basically, what I'm trying to achieve is find the default location of where my sql server databases are stored on my hard drive so I can link them to my program.

Following my steps previously described I then press the 'browse' button and the FileDialog comes up directed at "C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Samples" which is where I find the northwind database.

I wish to locate a database I've created in sqlserver 2008, but cannot locate the database files anywhere on my hard drive.

I am able to achieve a connection through use of 'using System.Data.SQLClient' and creating a connection string, but would like to have to database as a datasource so I can work

View Complete Post

More Related Resource Links

MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source D

Hello, On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink. A data source has not been supplied for the data source DS_TraceEvents SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX) 1. exec sp_executesql N'SELECT dtb.name AS [Name] FROM master.sys.databases AS dtb WHERE (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX' this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server). 2. USE [datatbaseX] this produces the following error: Msg 911, Level 16, State 1, Line 1 Database 'databaseX' does not exist. Make sure that the name is entered correctly. why is the report looking for the database on my server? thanks Jag Environment: MDW (Management Data Warehouse) on SQL 2008 R2  

I need to create a script in SSIS which creates a data source that connects to an Access database.

I need to create a script in SSIS which creates a data source that connects to an Access database. The Access database file name needs to be set as a variable as it will change from month to month. I have no idea what I am doing can anybody give me some tips? Mr Shaw

what is the better design for location of system database data / log files and user data/log file,

is there a guideline for better performance for system database data location log location, like tempdb location etc. also better location for user databases/data and log.

SSIS 2005 - XML Source no data loading to sql server database destination

Hello I am trying to load data from xml source to sql server destination, but the task executes with no data loaded to destination. i really appreciate any guidance in working and troubleshooting xml sources. Regards Harris

VS2010 Deploying Database Project - Error: Cannot create file [...]MSSQL10.MSSQLSERVER\MSSQL\DATA\m

I had SQL Express from a previous installation of VS2010. I uninstalled All SQL and VS2010 and re-installed VS2010 (without Express) and then re-installed SQL Server 2008 Developer Edition. Now when I try to deploy a database project I am receiving the following error:     Creating EDDY.Cheetah.Database.Server... ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 5170, Level 16, State 1, Line 1 Cannot create file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf' because it already exists. Change the file path or the file name, and retry the operation. ...\sql\debug\Server.sql(38,0): Error SQL01268: .Net SqlClient Data Provider: Msg 1802, Level 16, State 4, Line 1 CREATE

Cant open dtsx project when the data source is Excel

hi All, i have problem opening my dtsx file. it returns error like: TITLE: SQL Server Import and Export Wizard ------------------------------ An error occurred which the SQL Server Integration Services Wizard was not prepared to handle. ------------------------------ ADDITIONAL INFORMATION: Exception has been thrown by the target of an invocation. (mscorlib) ------------------------------ The connection type "EXCEL" specified for connection manager "{AD831AF9-657F-4509-981E-EE593FDFA421}" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.  ({004CD349-A469-43E7-AE5E-CDA5629AEBFB}) ------------------------------ The connection type "EXCEL" specified for connection manager "{AD831AF9-657F-4509-981E-EE593FDFA421}" is not recognized as a valid connection manager type. This error is returned when an attempt is made to create a connection manager for an unknown connection type. Check the spelling in the connection type name.  ({004CD349-A469-43E7-AE5E-CDA5629AEBFB}) everything was working fine a week ago, when i try to open it again this mornging for modification, everything isnt good. any idea what should i do? thanks!!!AddinGanteng

Cannot submit an infopath 2007 data source to sql database using managed code - C#.


Is this possible?  I can submit the data source just fine using custom action rules either from a submit button on the form or from the submit button from the tool bar.

But when I try to use C# nothing below works, Main Connection is my data source.  I get unhandled exception errors when I run the form in debug

AdoSubmitConnection sc = (AdoSubmitConnection)this.DataConnections["Main Connection"];

WebServiceConnection sc = (WebServiceConnection)this.DataConnections["Main Connection"];

FileSubmitConnection sc = (FileSubmitConnection)this.DataConnections["Main Connection"];

However I can send an email just fine using ;

EmailSubmitConnection sc = (EmailSubmitConnection)this.DataConnections["Email Connection"];


Any help would be greatly appreciated



Data Mining Project in BIDS: Why cant data source views be based on a query?

I've created an analysis services project in BIDS with the intention of creating a mining strucuture. I notice that you cannot create a data source view based on a query and that it must be based on linking actual tables (via the access looking GUI).  In my scenario I have a very long and complicated query which uses temp tables to retreive the data I want to use for mining.   Am I forced to insert this data into a table in order to create and use a mining structure?  Or are there other ways to do it?

Linq - add data to database then email user the details


Hi all

I'm not sure how to structure the code for this but what I want to do is be able to add data to a database, and once this has completed successfully, then email the user to say the details have been added successfully to the database.

I need to:

1. Check that the relevant data has been added into the database then

2. Email the details of the relevant data when completed. 


Thanks in advance for your help,




huge number of data from database ... so how to minimize load time


Hi ...

I have used the above method to configure my crystal report ...

Its working fine , But i have huge number of data in database ....

So , it take long time to load the report ...

So , i have decided to show only the last 50 records inserted into the database , not all the 500 records to be loaded every time.

Plz help me with this issue  ...


Also , Plz explain me abt index legend in crystal report.

Saving textbox data to MySql database in asp.net


Hi dear coders

though a very simple question to ask, but please tell me how to save and retrieve data in/from my textboxes to/from database (MYSQL) on submit button click.

i know its a very simple task but i cant make it done, so i request you to please send me some working example link or post any helpful code here in asp.net

i will be highly thankful for any kind help from you geniuses.



Need Oracle Data Provider .CS File for Oracle 10g Database connection !



I need a 'Wrapper.cs' file which takes care of the Database connection ( Oracle 10g) where

i can just call the method with my SQL Query


Gridview1.DataSource = SampleWrapper.ExecuteDatatable("THE SQL QUERY");


Plz Post the link if there is any open source !    

Data Points: Windows Azure Table Storage - Not Your Father's Database


Let go of your traditional relational database thinking if you want to understand how Windows Azure Table storage works, says Julie Lerman. Luckily for you, she's done the hard work to grasp the new concepts and help you get up to speed.

Julie Lerman

MSDN Magazine July 2010

SQL Data Services: The Relational Database of the Azure Services Platform


This article shows you the new face of SQL Data Services, explores its architecture, and shows how it is truly an extension of SQL Server in the cloud.

David Robinson

MSDN Magazine August 2009

Toolbox: Data Snapshots, Subversion, Source Code Organization and More


If you want to save, organize, and annotate snapshots of your database data, find an easy way to install and configure Subversion, and automate the organization of your source code, then you'll want to read more about these latest tools.

Scott Mitchell

MSDN Magazine August 2009

Under the Table: How Data Access Code Affects Database Performance


In this article, the author delves into some commonly used ways of writing data access code and looks at the effect they can have on performance.

Bob Beauchemin

MSDN Magazine August 2009

Data Joins The Team: Introducing Visual Studio 2005 Team Edition for Database Professionals


Here Brian Randell presents everything you need to know to get started with Visual Studio 2005 Team Edition for Database Professionals.

Brian A. Randell

MSDN Magazine February 2007

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend