Click here to Skip to main content
15,902,939 members
Home / Discussions / C#
   

C#

 
AnswerBad forum etiquette - don't post the same thing more than once Pin
Pete O'Hanlon21-Aug-09 1:56
mvePete O'Hanlon21-Aug-09 1:56 
GeneralRe: Bad forum etiquette - don't post the same thing more than once Pin
EliottA21-Aug-09 2:49
EliottA21-Aug-09 2:49 
QuestionToolStrip Scrolling Pin
Tiger45621-Aug-09 1:19
Tiger45621-Aug-09 1:19 
AnswerRe: ToolStrip Scrolling Pin
xstoneheartx21-Aug-09 3:40
xstoneheartx21-Aug-09 3:40 
QuestionDynamic menu Pin
rummer21-Aug-09 0:58
rummer21-Aug-09 0:58 
QuestionHow to open multiple pdf files Pin
kanchoette21-Aug-09 0:54
kanchoette21-Aug-09 0:54 
AnswerRe: How to open multiple pdf files Pin
stancrm21-Aug-09 0:58
stancrm21-Aug-09 0:58 
QuestionCan I use RequireFieldValidator or should I just try to write code to check two textboxes entry? Pin
vanillaET21-Aug-09 0:27
vanillaET21-Aug-09 0:27 
AnswerRe: Can I use RequireFieldValidator or should I just try to write code to check two textboxes entry? Pin
Pete O'Hanlon21-Aug-09 1:00
mvePete O'Hanlon21-Aug-09 1:00 
Question[Message Deleted] Pin
RS.Ratheesh21-Aug-09 0:01
RS.Ratheesh21-Aug-09 0:01 
AnswerRe: Selectable, resizable and movable Shapes Pin
Eddy Vluggen21-Aug-09 0:20
professionalEddy Vluggen21-Aug-09 0:20 
QuestionIs there any demo for streaming media player in C# on WinCE? Pin
hjzr20-Aug-09 23:39
hjzr20-Aug-09 23:39 
QuestionInteger Value Pin
Rajee Maharjan20-Aug-09 23:18
Rajee Maharjan20-Aug-09 23:18 
AnswerRe: Integer Value Pin
Programm3r20-Aug-09 23:33
Programm3r20-Aug-09 23:33 
AnswerRe: Integer Value Pin
Richard MacCutchan25-Aug-09 10:29
mveRichard MacCutchan25-Aug-09 10:29 
Question[Message Deleted] Pin
Ajithevn20-Aug-09 22:58
Ajithevn20-Aug-09 22:58 
AnswerRe: event for navigation symbols in a calander control Pin
dragonius20-Aug-09 23:04
dragonius20-Aug-09 23:04 
QuestionEntlib + config problem Pin
dragonius20-Aug-09 22:26
dragonius20-Aug-09 22:26 
Hello All,

I've got a problem with EntLib 4.1 in combination with my config file.

I have a class library for data access which has its own app.config file containing the information for the sql connection.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </configSections>
  <dataConfiguration defaultDatabase="CarOmnia" />
    <connectionStrings>
        <add name="CarOmnia" providerName="System.Data.SqlClient" connectionString="server=(local);database=CarOmnia;User Id=xx;Password=xxxx;" />
    </connectionStrings>
</configuration>


Code to access the database:
public static DataSet SelectAll()
        {
            DataSet retValue = new DataSet();

            try
            {
                Database db = DatabaseFactory.CreateDatabase();
                DbCommand cmd = db.GetStoredProcCommand(stpTest);
                retValue = db.ExecuteDataSet(cmd);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return retValue;
        }


With this go the following includes:
using System.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;


What am i doing wrong, i'm getting the following error on the CreateDatabase() line:

{"The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, null]) failed: The value can not be null or an empty string. (Strategy type ConfiguredObjectStrategy, index 2)"}
GeneralRe: Entlib + config problem Pin
Programm3r20-Aug-09 23:28
Programm3r20-Aug-09 23:28 
GeneralRe: Entlib + config problem Pin
dragonius20-Aug-09 23:37
dragonius20-Aug-09 23:37 
GeneralRe: Entlib + config problem Pin
Programm3r21-Aug-09 0:03
Programm3r21-Aug-09 0:03 
AnswerRe: Entlib + config problem Pin
bross@gwlc.com6-Apr-10 6:07
bross@gwlc.com6-Apr-10 6:07 
QuestionAdding checkboxes in listbox in C# Pin
yogesh_softworld12320-Aug-09 22:21
yogesh_softworld12320-Aug-09 22:21 
AnswerRe: Adding checkboxes in listbox in C# Pin
musefan20-Aug-09 22:26
musefan20-Aug-09 22:26 
AnswerRe: Adding checkboxes in listbox in C# Pin
dragonius20-Aug-09 22:29
dragonius20-Aug-09 22:29 

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.