|
Posted by stevedtrm on 12/19/07 20:38
At:-
http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/browse_thread/thread/296fcecdbdd5eabf/be1629eaa918d882?lnk=st&q=dataphor+ADO#be1629eaa918d882
Steve Dassin says:-
"If you are truely a beginner then your brain hasn't been filled with
crazy
glue yet.
For application development check out Dataphor. "
I am not yet proficient with SQL, and I'd like to avoid becoming
proficient with it. There are enough frustrated intellectuals banging
on about how inadequate it is for me to be virtually certain they're
right about Dataphor.
However, in this post:-
http://groups.google.com/group/comp.databases.theory/browse_thread/thread/84cbc31ec98e9175/b981741cab1c4f14?lnk=st&q=dataphor+mapping+resort#b981741cab1c4f14
Lauri says:-
" > I think an implementor would be better off using an SQL database
> underneath, and using their code layer in between to accomplish the
> "divorce" from the aspects of SQL that they disapprove of.
That is, in fact, the approach taken in a product called Dataphor
(see www.alphora.com). They have implemented a "D"-language (called
D4)
that translates into SQL and hence uses underlying SQLServer, Oracle
or DB2- DBMS'es as the engine.
It is, however, not a very easy mapping to do and you have to resort
to all sorts of unclean stuff to make it work...
regards,
Lauri Pietarinen"
and he's right. Like Lauri says, it aint easy.
The documentation is skeletal for the "DAC provider" and almost non
existent for the ADO provider, both of which I am trying to get
working. With the ADO provider I am trying both an untyped and typed
dataset grid view in a windows form.
I have been getting a few helpful nudges from people involved with or
using D4, but I need further help to get the providers working. Things
are getting so bad that I may soon be forced to learn SQL.
Anyone know if there are any suitable forums for support with this
apart from this one?
Below are outlines of the problems I am having with each of the two
providers.
------------------------
Section 1 - The ADO provider
I have two datagrid views, two datasets both set to the same table in
the DBMS.
When I change a data row value in the first data gridview, I want it
to appear in the second data gridview.
DaeDataAdapter1.Update(DataSet2, "jobs")
gives me repeated sets of data, because the schema information
indicating key columns is missing.
---
So, to fill the table column schema:-
DaeDataAdapter1.FillSchema(DataSet2, SchemaType.Source, "jobs")
or
DaeDataAdapter1.MissingSchemaAction = MissingSchemaAction.AddWithKey
which both give this error:-
"Type of value has a mismatch with column type Couldn't store
<System.Short> in ProviderType Column. Expected type is Type."
1) The table column schema is the table attached to a data table
that describes the properties of the columns, with the column names
recorded as rows, and the properties of columns listed as attributes
in the table.
2) The provider type column in the table column schema is a
column which describes the type as it is referred to by the provider/
DBMS being referenced.
3) Therefore the table column schema "provider type" column data
type would normally be "type"
4) The Dataphor ADO provider is trying to fill this with a
"system.short" type and not a "type" type
5) The provider is therefore asking the dataset to record the
provider's datatype as some sort of numerical reference (for
conversions to DBMS recognized data types during updates/inserts?)
6) Therefore dataphor refers to its pool of data types by a
numerical reference.
Hope that makes sense. Am I thinking along the right lines here?
The data type of the type column in the column schema is clearly
"type", so why is the dataphor datadapter trying to fill it with
"system.short"?
How could the attempt to specify the type of the providertype column a
"system.short" be otherwise explained?
And how would one get ADO datasets to allow Dataphor's type
references? A custom dataset object/control/class, perhaps?
Is there any better terminology for this than "Table column schema
providertype column data type"?
------------------------
Section 2 - The DAC provider
I've previously managed to get the ADO parameters functioning
satisfactorily for an update statement, but am having difficulty doing
the same in the "DAC" provider.
Below is the code I use at run time:-
Private seymore As New Alphora.Dataphor.DAE.Client.DataSetParamGroup
Private jobid1 As New Alphora.Dataphor.DAE.Client.DataSetParam
....
DataView1.ParamGroups.Add(seymore)
seymore.Source = DataSource1
This gives me a stack overflow exception(?!).
---
When I add param groups to the paramgroups collection property of the
dataview at design time, and then
count them with
MsgBox(DataView1.ParamGroups.Count)
Or
MsgBox(DataView1.ParamGroups.Contains(0))
it responds as if they don't exist.
---
Atdesign time, it tells me in the dataparamgroup datasource property
"object reference not set to instance of object"
Even when I have set it to the only datasource, when I close the
collection and then return to that property of that dataparamgroup, it
gives this same message.
---
DataView1.ParamGroups.Add(seymore)
'seymore.Source = DataSource1
MsgBox(DataView1.ParamGroups.Count)
MsgBox(DataView1.ParamGroups.Contains(seymore))
seymore.Params.Add(jobid1)
also gives the "object reference" exception even immediately after
recognising the seymore object as a member of the paramgroups
collection.
I get the feeling I'm overlooking something horribly simple. :(
------------------------
Help!
Steve B.
[Back to original message]
|