Click here to Skip to main content
15,913,487 members
Home / Discussions / Database
   

Database

 
QuestionReading Data From Password Protected Acces Database Using VB Program Pin
vijukalan20-Jun-06 15:38
vijukalan20-Jun-06 15:38 
AnswerRe: Reading Data From Password Protected Acces Database Using VB Program Pin
Edbert P21-Jun-06 14:03
Edbert P21-Jun-06 14:03 
Questionithout image an messageIMages Pin
md_refay20-Jun-06 12:38
md_refay20-Jun-06 12:38 
AnswerRe: ithout image an messageIMages Pin
Colin Angus Mackay20-Jun-06 13:13
Colin Angus Mackay20-Jun-06 13:13 
GeneralRe: ithout image an messageIMages Pin
md_refay20-Jun-06 22:21
md_refay20-Jun-06 22:21 
GeneralRe: ithout image an messageIMages Pin
Colin Angus Mackay20-Jun-06 22:44
Colin Angus Mackay20-Jun-06 22:44 
GeneralRe: ithout image an messageIMages Pin
Colin Angus Mackay21-Jun-06 1:35
Colin Angus Mackay21-Jun-06 1:35 
QuestionProblem using EntLib DAAB for .NET 2.0 Pin
supD20-Jun-06 9:30
supD20-Jun-06 9:30 
I created a windows form in VS2005 that uses Enterprise Library - DAAB - version Jan 2006 to access the DB in its constructor. Everything works fine; however, when I created a UserControl that attempts to store that form as a variable, the VS 2005 designer will not let me drag that UserControl onto a new form. It gives me the following error:

“Failed to create component ‘UserControl’. The error message follows: ‘System.NullReferenceException: Object reference not set to an instance of object. At Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView.get_DefaultName(), at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseMapper.MapName(String name, IConfigurationSource configSource)…….”

Everything compiles successfully without errors; however, I am unable to use the UserControl on any forms. After debugging, I found that the error is caused by the line “Database db = DatabaseFactory.CreateDatabase();” This line is standard DAAB code and is supposed to work and it does works in all cases I’ve run across EXCEPT this.

Is this a bug in the DAAB, or VS Designer, or am I missing something? Any help will be appreciated! Thanks in advance!

Below is the relevant code:

public partial class SampleControl : UserControl
{
private ProductForm subForm = new ProductForm();

public SampleControl ()
{
InitializeComponent();
}
}

public partial class ProductForm : Form
{
public ProductForm()
{
InitializeComponent();
AccessDB();
}

private void AccessDB()
{
//THIS LINE CAUSES THE DESIGNER ERROR
Database db = DatabaseFactory.CreateDatabase();
}
}

Thanks
AnswerRe: Problem using EntLib DAAB for .NET 2.0 Pin
Colin Angus Mackay20-Jun-06 10:48
Colin Angus Mackay20-Jun-06 10:48 
AnswerRe: Problem using EntLib DAAB for .NET 2.0 Pin
Not Active21-Jun-06 9:34
mentorNot Active21-Jun-06 9:34 
QuestionHow do I reattach a database file that was not detached? Pin
Jesse Evans20-Jun-06 8:55
Jesse Evans20-Jun-06 8:55 
AnswerRe: How do I reattach a database file that was not detached? Pin
Eric Dahlvang20-Jun-06 12:14
Eric Dahlvang20-Jun-06 12:14 
GeneralRe: How do I reattach a database file that was not detached? Pin
Jesse Evans20-Jun-06 12:26
Jesse Evans20-Jun-06 12:26 
QuestionDatagrid showing bogus data [modified] Pin
leckey20-Jun-06 7:41
leckey20-Jun-06 7:41 
AnswerRe: Datagrid showing bogus data Pin
Edbert P20-Jun-06 19:22
Edbert P20-Jun-06 19:22 
GeneralRe: Datagrid showing bogus data Pin
leckey21-Jun-06 3:12
leckey21-Jun-06 3:12 
GeneralRe: Datagrid showing bogus data Pin
Edbert P21-Jun-06 14:01
Edbert P21-Jun-06 14:01 
QuestionLooking for Book Recommendation ... Pin
David Patrick20-Jun-06 6:54
David Patrick20-Jun-06 6:54 
AnswerRe: Looking for Book Recommendation ... Pin
Eric Dahlvang22-Jun-06 9:19
Eric Dahlvang22-Jun-06 9:19 
QuestionExtract column name of a table Pin
bony_baba20-Jun-06 1:55
bony_baba20-Jun-06 1:55 
AnswerRe: Extract column name of a table Pin
Colin Angus Mackay20-Jun-06 2:10
Colin Angus Mackay20-Jun-06 2:10 
GeneralRe: Extract column name of a table Pin
bony_baba20-Jun-06 2:55
bony_baba20-Jun-06 2:55 
GeneralRe: Extract column name of a table Pin
vivek-g20-Jun-06 23:16
vivek-g20-Jun-06 23:16 
GeneralRe: Extract column name of a table Pin
Colin Angus Mackay21-Jun-06 8:35
Colin Angus Mackay21-Jun-06 8:35 
QuestionConnecting to Oracle DB through webservice Pin
mew_lobo20-Jun-06 0:53
mew_lobo20-Jun-06 0:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.