By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,979 Members | 943 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,979 IT Pros & Developers. It's quick & easy.

anyone tCied componentOne Schedule.Net plz?

P: n/a
have anyone tried ComponentOne Schedule.Net? I got this code from C1 in VB
but when I try in C1 I get this error:

Object reference not set to an instance of an object.

here is the VB code i received from them:

Private ds As DataSet
Private da As OleDbDataAdapter
Private dc As OleDbConnection
Private cb As OleDbCommandBuilder
Private cs As String

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

cs = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Nwind.mdb;Persist
Security Info=False"
dc = New OleDbConnection(cs)
da = New OleDbDataAdapter("Select * from Appointments", dc)
ds = New DataSet


Me.C1Schedule1.DataStorage.AppointmentStorage.Mapp ings.AppointmentProperties.MappingName
= "Properties"
Me.C1Schedule1.DataStorage.AppointmentStorage.Mapp ings.IdMapping.MappingName
= "ID"
Me.C1Schedule1.DataStorage.AppointmentStorage.Mapp ings.Location.MappingName
= "Location"
Me.C1Schedule1.DataStorage.AppointmentStorage.Mapp ings.Subject.MappingName
= "Subject"
Me.C1Schedule1.DataStorage.AppointmentStorage.Mapp ings.Start.MappingName
= "Start"
Me.C1Schedule1.DataStorage.AppointmentStorage.Mapp ings.Body.MappingName
= "Body"
Me.C1Schedule1.DataStorage.AppointmentStorage.Mapp ings.End.MappingName
= "End"

Me.C1Schedule1.DataStorage.AppointmentStorage.Data Member =
Me.C1Schedule1.DataStorage.AppointmentStorage.Data Source = ds

End Sub

and here is my C# code:

sql_connection = new SqlConnection("Data
Source=.\\SQLEXPRESS;initial catalog=shefa;integrated security=true");
sql_adapter = new SqlDataAdapter("select * from
dbo.appointments", sql_connection);

data_set = new DataSet();

binding_source.DataMember = "appointments";
binding_source.DataSource = data_set;

this.c1Schedule1.DataStorage.AppointmentStorage.Ma ppings.AppointmentProperties.MappingName
= "properties";
this.c1Schedule1.DataStorage.AppointmentStorage.Ma ppings.IdMapping.MappingName
= "ID";
this.c1Schedule1.DataStorage.AppointmentStorage.Ma ppings.Location.MappingName
= "location";
this.c1Schedule1.DataStorage.AppointmentStorage.Ma ppings.Subject.MappingName
= "subject";
this.c1Schedule1.DataStorage.AppointmentStorage.Ma ppings.Start.MappingName
= "start";
this.c1Schedule1.DataStorage.AppointmentStorage.Ma ppings.Body.MappingName
= "body";
this.c1Schedule1.DataStorage.AppointmentStorage.Ma ppings.End.MappingName
= "end";

this.c1Schedule1.DataStorage.AppointmentStorage.Da taSource =
this.c1Schedule1.DataStorage.AppointmentStorage.Da taMember =

Aug 22 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.