hi..im doing a C# windows form application in visual studio 2008 and for the database im using SQL EXPRESS 2005..i need to create a crystal report. my question is when i start creating a new crystal report, using wizard, i get 1 window where i have to choose Data: i have the following options: Project data, current connections, favorites, history and create new connection. when 1 click on create new connection i get: Access/Excel, ADO.NET, Database Files, ODBC, OLE DB(ADO) and more data sources. when i select OLE DB i get 1 list. which one should i choose for SQL Express?

Recommended Answers

All 9 Replies

OLEDB is fine to be used in this context but wasn't there any datasource named Microsoft Sql Server?

yes there was Sql server, but when i choose it, its asking for the server name..what should i input there? i created the database from visual studio itself

your database server name.... don't you have that? The connection string is supposed to be like "Data Source=DataBase_server_name;Initial Catalog=DataBase_Name;Integrated Security=true" check you connection string

DataBase_server_name, is SQLEXPRESS..i entered it there but it didnt work!

when you query your database to which server you connect to ? SQLEXPRESS is the sql server edition not the sql server name ....

Are you getting data from your database anywhere else too?? if yes then check the connection string there and copy the server name

mycon.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Effort Tracker System\\Effort Tracker System\\ETS.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";

thats my connection string

try to use this whole ".\\SQLEXPRESS"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.