473,387 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

anyone tCied componentOne Schedule.Net plz?

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

da.Fill(ds)

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 =
ds.Tables(0).TableName
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();
sql_adapter.Fill(data_set);

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 =
data_set;
this.c1Schedule1.DataStorage.AppointmentStorage.Da taMember =
data_set.Tables[0].TableName;

Aug 22 '07 #1
0 1088

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Job Lot | last post by:
I have recently installed ComponentOne controls from VB.NET resource kit. I am using the ComponentOne Chart control to chart data in my windows forms application. Could someone please tell me how I...
2
by: rocketrooster | last post by:
My box is single processor 2.4G P4 with XP pro. VS.net 2003 installed. I downloaded the MSDN VB.net resource kit. And requested a S/N from ComponentOne for the install of the studio controls. ...
1
by: Dave Harris | last post by:
I am trying to convert QuickBasic and dos batch files into VB.NET. I downloaded the resource kit along with the free ComponentOne Zip classes. The examples that came with the zip utility were not...
6
by: Aaron Smith | last post by:
Has anyone used ComponentOne's Enterprise studio that comes in the VB.Net resource kit? I like some of the controls they have, but I've had a few wierd issues and I am wondering if that's a sign of...
3
by: Geoff Jones | last post by:
Hi I've installed the "free" ComponentOne software in the VB Resource Kit, however, I don't seem to be able to see any of the items in the ToolBox e.g. Chart. I can run the example files but...
1
by: Yavuz Bogazci | last post by:
Hi, i need a Component Suite. I looked at ComponentOne Enterprise Studio and for Infragistics NetAdvantage. I need Components WinForms and for WebForms. Especially Charting and Grid Controls,...
7
by: christophe.marcelino | last post by:
Hi, I am using the ComponentOne tool for developping an automatisation of reporting. My problem is that when i try to export the report, using the printviewer of C1, it does it really well but...
1
by: Shailja | last post by:
Hi, Does VB support componentone VSFlex Grid? If yes, how to add to form? If not, do i need to download it? If it needs to download, from which site, will i get it? Please help me soon.
1
by: amundsen | last post by:
I need to build a scheduling program. It will need to schedule a chain of resources. I'm wondering if anyone is aware of an existing framework that might help me to code this application. The...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.