|
It is users.sql :
use NHibernate
go
CREATE TABLE users (
LogonID nvarchar(20) NOT NULL default '0',
Name nvarchar(40) default NULL,
Password nvarchar(20) default NULL,
EmailAddress nvarchar(40) default NULL,
LastLogon datetime default NULL,
PRIMARY KEY (LogonID)
)
go
It is users.cs :
using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
namespace NHibernate.Examples.QuickStart
{
public class User
{
private string id;
private string userName;
private string password;
private string emailAddress;
private DateTime lastLogon;
public User()
{
}
public string Id
{
get { return id; }
set { id = value; }
}
public string UserName
{
get { return userName; }
set { userName = value; }
}
public string Password
{
get { return password; }
set { password = value; }
}
public string EmailAddress
{
get { return emailAddress; }
set { emailAddress = value; }
}
public DateTime LastLogon
{
get { return lastLogon; }
set { lastLogon = value; }
}
}
//interface ISession
//{
// void save(users newUser);
// void Save(users newUser);
//}
}
It is User.hbm.xml :
using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using NHibernate.Cfg;
namespace NHibernate.Examples.QuickStart
{
public class User
{
private string id;
private string userName;
private string password;
private string emailAddress;
private DateTime lastLogon;
public User()
{
}
public string Id
{
get { return id; }
set { id = value; }
}
public string UserName
{
get { return userName; }
set { userName = value; }
}
public string Password
{
get { return password; }
set { password = value; }
}
public string EmailAddress
{
get { return emailAddress; }
set { emailAddress = value; }
}
public DateTime LastLogon
{
get { return lastLogon; }
set { lastLogon = value; }
}
}
//interface ISession
//{
// void save(users newUser);
// void Save(users newUser);
//}
}
It is App.config :
<configuration>
<configsections>
<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider">
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2005Dialect">
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver">
<add key="hibernate.connection.connection_string" value="Data Source=dev2;Initial Catalog=NHibernate;User ID=sa;Password=buyagift;">
It is Programs.cs :
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace NHibernate
{
static class Program
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// Application.Run(new NHibernate.Form1());
Application.Run(new NHibernate.Examples.QuickStart.Form1());
}
}
}
This code generates following error:
Unknown entity class: NHibernate.Examples.QuickStart.User
Can anyone help me please?
Thanks
shoaib
|
|
|
|
|
You may want to ask in the SQL forum.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Please stick the format that flows in this Community
1) Don't post kilometers of code.
2) Use code wrappers around the code for better visibility.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing.
Oscar Wilde (1854-1900)
Regards...
Shouvik
|
|
|
|
|
I am not a programmer, but I need to include Paypal's ADD BUTTON and VIEW CART BUTTON in gridview that reads from an Access Database for online store.
Anyone have any code to share along these lines?
Thanks
James
|
|
|
|
|
|
Yes, I have, but it does not solve my problem. I can do what is being done in this article, which requires manual coding, unless I'm not reading it right. I will give it a closer look.
Thanks.
|
|
|
|
|
wats the cause & how to remove Auto Play option when we click on Ikons of HDD
|
|
|
|
|
WHAT?? It sounds like you have a file in the root of the drive called "Autorun.inf". Kill it.
|
|
|
|
|
Don't tell me. Tell the OP. That way, he'll get a notice that you replied to his message.
|
|
|
|
|
Oops clicked somebody else's Reply
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing.
Oscar Wilde (1854-1900)
Regards...
Shouvik
|
|
|
|
|
Beware this is also the work of the virus w32.Fujacks.K. See if u have a hidden file Desktop_.ini in all folders u have. It will contain the timestamp of the time it was created. IF so please use some good Antivirus viz. McAfee.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing.
Oscar Wilde (1854-1900)
Regards...
Shouvik
|
|
|
|
|
I have installed oracle 9i in my system. After installation is over,i am unable to login with scott/tiger login. It gives me ORA-12154 error.. Could anyone please help in solving this problem and use oracle..
Thanks in advance,
Umashanker.K
|
|
|
|
|
Why no one is helping me out in this.. i badly need a answer.
Umashanker.K
|
|
|
|
|
Probably because CodeProject is NOT the best place to get support for Oracle. Very few people around here actually use it. What you should have been doing is Googling for Oracle support forums, or simply type in the error number and/or message and seeing what you come up with. Such as this[^].
|
|
|
|
|
can u send the tnsnames.ora file it will be found in if clinet then on driveletter:\ORANT\NET80\ADMIN and on server then path is driveletter:\oracle\network\admin.
Also mention your client and server are same
|
|
|
|
|
Can anyone guide me in getting a article on creating scehmea in oracle 9i.
Thanks in advance,
Umashanker.K
|
|
|
|
|
|
Didn't know where to put this, sorry...
"I'm a mushroom cloud layin motherf*cker, motherf*cker!"
- Marsellus Wallace from Pulp Fiction
|
|
|
|
|
Easy. Ignore your wife/girlfriend for a year and answer lots of questions on CP.
|
|
|
|
|
Dave Kreskowiak wrote: Easy. Ignore your wife/girlfriend for a year and answer lots of questions on CP.
I love your way of saying that. It is a blissful happiness to help the peers in thier technical quest instead of loitering for mundane worldly pleasures.
|
|
|
|
|
you did like that?
|
|
|
|
|
Yep! Three times now and working on a 4th straight MVP!
|
|
|
|
|
Great... it's really impressive.. I respect those people who got MVP from CP or Microsoft because they spent a lot of time for helping other people's problem.. One of my friend is also MVP in Visual Basic.
I hope that I will be MVP on one day.
Best of luck for your 4th MVP!!!
|
|
|
|
|
average post score outside the lounge (and presumably the soapbox?).
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
dan neely wrote: score
Did you mean the Vote?
|
|
|
|