I come back to my first configuration,
and i think there are some errors in the project that i don't know how
work out,
if you can download my project it is useful to understand .
Thanks for all.
I wish happiness(instead i'm thinking to broke my Computer :))
Bye
On Nov 4, 3:20 pm, HelpNH <[EMAIL PROTECTED]> wrote:
> When appear the ADOException
> i click on viewdetail and i read in Inner Exception this:
>
> {"Database 'c:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\
> \DATA\\ExampleWPF.mdf' already exists.\r\nCould not attach file 'C:\
> \Documents and Settings\\GIORGIO\\Desktop\\Exercise\\ExampleWPF\
> \ExampleWPF\\ExampleWPF.mdf' as database 'ExampleWPF'."}
>
> Why tell That? I turn off SQLServer and i removed also the Connection
> in Server Explorer..
> Thanks again!!!
> Bye
>
> On Nov 4, 3:01 pm, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote:
>
> > There should be an inner exception in the exception thrown, there you'll get
> > detailed description for the exception./
>
> > On Tue, Nov 4, 2008 at 9:56 AM, HelpNH <[EMAIL PROTECTED]> wrote:
>
> > > Hi Tuna,
> > > I moved the mdf and ldf(log) file into the folder where are others
> > > xaml files(GUI Project)
> > > but i receive the same error.
> > > "Cannot open Connection"
>
> > > ______i post my Hibernate.cfg.xml file______
>
> > > <?xml version="1.0" encoding="utf-8" ?>
> > > <hibernate-configuration
> > > xmlns="urn:nhibernate-configuration-2.2">
> > > <session-factory>
>
> > > <property name="connection.provider">
> > > NHibernate.Connection.DriverConnectionProvider
> > > </property>
> > > <property name="dialect">
> > > NHibernate.Dialect.MsSql2005Dialect
> > > </property>
> > > <property name="connection.driver_class">
> > > NHibernate.Driver.SqlClientDriver
> > > </property>
>
> > > <property name="connection.connection_string">
>
> > > Server=ERUSYAKO\SQLEXPRESS;AttachDbFilename=C:\Documents and
> > > Settings\GIORGIO\Desktop\Exercise\ExampleWPF\ExampleWPF
> > > \ExampleWPF.mdf; Database=ExampleWPF;Trusted_Connection=Yes;
> > > </property>
>
> > > <property name="use_proxy_validator">false</property>
> > > </session-factory>
> > > </hibernate-configuration>
>
> > > I hope that its can help you to understand better.
> > > Thanks
> > > Bye
>
> > > On Nov 4, 2:28 pm, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote:
> > > > Move the mdf and ldf files in the project which has the xaml files.
>
> > > > On Tue, Nov 4, 2008 at 9:26 AM, HelpNH <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi Tuna,
> > > > > i added int he Hibernate.cfg.xml the string that you wrote down but
> > > > > sorry
> > > > > what mean "Move the database in the GUI Project"? Sorry for my
> > > > > ignorance...
> > > > > Thanks so much.
> > > > > Have a good work.
> > > > > Bye
>
> > > > > On Nov 4, 2:07 pm, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote:
> > > > > > Hi
>
> > > > > > For now, move the database in the GUI project and in the
> > > > > hibernate.cfg.xml
>
> > > > > > Server=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|ExampleWPF.mdf;
> > > > > > Database=ExampleWPF;Trusted_Connection=Yes;
>
> > > > > > use this one
>
> > > > > > On Tue, Nov 4, 2008 at 8:40 AM, HelpNH <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > > > > Hi Tuna,
> > > > > > > i have got SQLServer but before i got SQLExpress (uninstalled)so i
> > > > > > > have only the instance/name of SQLExpress .
> > > > > > > DO you think is it a trouble of SQLServer?
> > > > > > > Thanks so much for your care.
> > > > > > > Bye
>
> > > > > > > On Nov 4, 12:05 pm, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote:
> > > > > > > > don't you have a SQLServer installed other than SQLExpress?
> > > > > > > > SqlExpress can be problematic due to various reason.
>
> > > > > > > > On Tue, Nov 4, 2008 at 3:51 AM, HelpNH <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > > > > HI,
> > > > > > > > > i attack my file on this webpage
>
> > > > > > > > >http://www.badongo.com/fr/file/11950778
>
> > > > > > > > > you can download it so you can understand better.
> > > > > > > > > Have a happy time.
> > > > > > > > > Bye
>
> > > > > > > > > On Nov 4, 8:21 am, HelpNH <[EMAIL PROTECTED]> wrote:
> > > > > > > > > > Hi Tuna,
> > > > > > > > > > i tried to change the string that you advice me but when i
> > > wish
> > > > > add a
> > > > > > > > > > contact appear:
>
> > > > > > > > > > ________ADOException was unhandled_________
>
> > > > > > > > > > cannot open the connection
>
> > > > > > > > > > instead with my configuration i could add a contact and
> > > > > > > > > > Phone
> > > > > number
> > > > > > > > > > but when i clicked
> > > > > > > > > > on the button save appear this error:
>
> > > > > > > > > > _________GenericADOException was unhandled by user
> > > > > > > code_______________
> > > > > > > > > > could not insert: [Domain.Contact][SQL: INSERT INTO
> > > ContactTbl
> > > > > (Name)
> > > > > > > > > > VALUES (?); select SCOPE_IDENTITY()]
>
> > > > > > > > > > I will post my project on the web.
> > > > > > > > > > Let me try!!!
> > > > > > > > > > Thanks so much for your take care.
> > > > > > > > > > I wish you happy day
> > > > > > > > > > Bye
>
> > > > > > > > > > On Nov 4, 12:42 am, "Tuna Toksöz" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > > > > Eventhough ugly, please try
>
> > > > > > > > > > > <property name="connection.connection_string">
> > > > > > > > > > > Data Source=.\SQLEXPRESS;Integrated
> > > > > Security=True;User
>
> > > Instance=True;AttachDBFilename=C:\Users\Administrator\Desktop\ExampleWPF\ExampleWPF\Database\ExampleWPF.mdf;Persist
> > > > > > > > > > > Security Info=False
> > > > > > > > > > > </property>
>
> > > > > > > > > > > I mean the absolute path.
>
> > > > > > > > > > > On Mon, Nov 3, 2008 at 7:13 PM, Tuna Toksöz <
> > > [EMAIL PROTECTED]
>
> > > > > > > wrote:
> > > > > > > > > > > > I think the problem is with SQL EXpress connection
> > > > > > > > > > > > string
>
> > > > > > > > > > > > Driver={SQL Native Client};Server=.\SQLExpress;
> > > > > AttachDbFilename=
>
> > > > > > > |DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;
>
> > > > > > > > > > > > connectionstrings.com says
>
> > > > > > > > > > > > On Mon, Nov 3, 2008 at 7:00 PM, HelpNH <
> > > > > [EMAIL PROTECTED]>
> > > > > > > > > wrote:
>
> > > > > > > > > > > >> Hi Tuna,
> > > > > > > > > > > >> thanks for your reply so fast,
> > > > > > > > > > > >> i tried to change as you advice me but nothing instead
> > > if
> > > > > use
> > > > > > > this
> > > > > > > > > > > >> configuration :
>
> > > > > > > > > > > >> <?xml version="1.0" encoding="utf-8" ?>
> > > > > > > > > > > >> <hibernate-configuration
> > > > > > > > > > > >> xmlns="urn:nhibernate-configuration-2.2">
> > > > > > > > > > > >> <session-factory>
>
> > > > > > > > > > > >> <property name="connection.provider">
>
> > > > > > > > > NHibernate.Connection.DriverConnectionProvider
> > > > > > > > > > > >> </property>
> > > > > > > > > > > >> <property name="dialect">
>
> > > NHibernate.Dialect.MsSql2005Dialect
> > > > > > > > > > > >> </property>
> > > > > > > > > > > >> <property
> > > > > > > > > > > >> name="connection.driver_class">
> > > > > > > > > > > >>
> > > > > > > > > > > >> NHibernate.Driver.SqlClientDriver
> > > > > > > > > > > >> </property>
>
> > > > > > > > > > > >> <property
> > > > > name="connection.connection_string">
> > > > > > > > > > > >> Data
> > > > > > > Source=ERUSYAKO\SQLEXPRESS;Integrated
> > > > > > > > > > > >> Security=True; initial
> > > > > > > > > > > >> catalog=ExampleWPF
> > > > > > > > > > > >> </property>
>
> > > > > > > > > > > >> <property
> > > > > > > name="use_proxy_validator">false</property>
> > > > > > > > > > > >> </session-factory>
> > > > > > > > > > > >> </hibernate-configuration>
>
> > > > > > > > > > > >> i can debug the project but when i wish save a contact
> > > > > appear
> > > > > > > this
> > > > > > > > > > > >> error:
>
> > > > > > > > > > > >> GenericADOException was unhandled by user
> > > > > code_______________
> > > > > > > > > > > >> could not insert: [Domain.Contact][SQL: INSERT INTO
> > > > > ContactTbl
> > > > > > > > > (Name)
> > > > > > > > > > > >> VALUES (?); select SCOPE_IDENTITY()]
>
> > > > > > > > > > > >> so i dont know where i must put my hand:(.
> > > > > > > > > > > >> Thanks again
> > > > > > > > > > > >> I wish you happy time
> > > > > > > > > > > >> Bye
>
> > > > > > > > > > > >> On Nov 3, 11:40 pm, "Tuna Toksöz" <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > > > > > > > > >> > Ah, it is probably easy.
>
> > > > > > > > > > > >> > In hobermate.cfg.xml change the line with following.
>
> > > > > > > > > > > >> > <property
> > > name="connection.connection_string">
> > > > > > > > > > > >> > Server=(local);initial
> > > > > > > > > catalog=nhibernate;Integrated
> > > > > > > > > > > >> > Security=SSPI
> > > > > > > > > > > >> > </property>
>
> > > > > > > > > > > >> > and set the dialect to following
>
> > > > > > > > > > > >> > <property
>
> > > > > name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
>
> > > > > > > > > > > >> > in case the driver is different, use
>
> > > > > > > > > > > >> > <property
>
> > > name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
>
> > > > > > > > > > > >> > On Mon, Nov 3, 2008 at 6:36 PM, HelpNH <
> > > > > [EMAIL PROTECTED]
>
> > > > > > > > > wrote:
>
> > > > > > > > > > > >> > > Hi,
> > > > > > > > > > > >> > > yes sorry from the project SimpleDemo of
> > > > > > > > > > > >> > > Mr.Quicoli,
> > > > > > > > > > > >> > > i rewrite that project (that's to learn and study
> > > > > Nhibernate
> > > > > > > > > With
> > > > > > > > > > > >> > > WPF) when i set up the file "Hibernate.cfg.xml" ,
> > > > > > > > > > > >> > > "Contact.hbm.xml" and "Phone.hbm.xml" to connect
> > > > > > > > > > > >> > > the
> > > Sql
>
> ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---