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

Value Given Error - Newbi

P: n/a
Hey Group,

I keep getting a error saying "No Value Given For One Or More Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I run
through my code line by line, so I can see which line is faulting?

Regards
MCN
Nov 20 '05 #1
Share this Question
Share on Google+
44 Replies


P: n/a
"MadCrazyNewbie" <te**@nospam.com> schrieb
Hey Group,

I keep getting a error saying "No Value Given For One Or More
Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I
run through my code line by line, so I can see which line is
faulting?


Yes, you can. I don't understand: The debugger should stop at the line
causing the error. Doesn't it?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2

P: n/a
"MadCrazyNewbie" <te**@nospam.com> schrieb
Hey Group,

I keep getting a error saying "No Value Given For One Or More
Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I
run through my code line by line, so I can see which line is
faulting?


Yes, you can. I don't understand: The debugger should stop at the line
causing the error. Doesn't it?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

P: n/a
No. I run my prog, click on my ToolBar button, which fills quite a few
datasets and verios other things, but when i click it it just pops up and
says ""No Value Given For One Or More Parameters". With a OK button, when I
click OK my prog carries on:(

Many Thanks
MCN

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40*********************@news.freenet.de...
"MadCrazyNewbie" <te**@nospam.com> schrieb
Hey Group,

I keep getting a error saying "No Value Given For One Or More
Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I
run through my code line by line, so I can see which line is
faulting?


Yes, you can. I don't understand: The debugger should stop at the line
causing the error. Doesn't it?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

P: n/a
No. I run my prog, click on my ToolBar button, which fills quite a few
datasets and verios other things, but when i click it it just pops up and
says ""No Value Given For One Or More Parameters". With a OK button, when I
click OK my prog carries on:(

Many Thanks
MCN

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40*********************@news.freenet.de...
"MadCrazyNewbie" <te**@nospam.com> schrieb
Hey Group,

I keep getting a error saying "No Value Given For One Or More
Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I
run through my code line by line, so I can see which line is
faulting?


Yes, you can. I don't understand: The debugger should stop at the line
causing the error. Doesn't it?
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

P: n/a
Cor
Hi MCN,

Show some code, I think it is one of your OleDb parameters?
(However withouth code this is a gues which maybe totaly wrong)

Cor
Nov 20 '05 #6

P: n/a
Cor
Hi MCN,

Show some code, I think it is one of your OleDb parameters?
(However withouth code this is a gues which maybe totaly wrong)

Cor
Nov 20 '05 #7

P: n/a
"MadCrazyNewbie" <te**@nospam.com> schrieb
No. I run my prog, click on my ToolBar button, which fills quite a
few datasets and verios other things, but when i click it it just
pops up and says ""No Value Given For One Or More Parameters". With a
OK button, when I click OK my prog carries on:(


Press Ctrl+Break when you see the message and have a look at the callstack
to see (from) where and why the message is shown.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #8

P: n/a
"MadCrazyNewbie" <te**@nospam.com> schrieb
No. I run my prog, click on my ToolBar button, which fills quite a
few datasets and verios other things, but when i click it it just
pops up and says ""No Value Given For One Or More Parameters". With a
OK button, when I click OK my prog carries on:(


Press Ctrl+Break when you see the message and have a look at the callstack
to see (from) where and why the message is shown.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #9

P: n/a
Armin,

If I press Ctrl+Break on the error, ir carries on running the prog and oks
the error:(

Also what bit of code would you need, theres quite a few lines in it:(

Ta
Si

"Cor" <no*@non.com> wrote in message
news:eg*************@tk2msftngp13.phx.gbl...
Hi MCN,

Show some code, I think it is one of your OleDb parameters?
(However withouth code this is a gues which maybe totaly wrong)

Cor

Nov 20 '05 #10

P: n/a
Armin,

If I press Ctrl+Break on the error, ir carries on running the prog and oks
the error:(

Also what bit of code would you need, theres quite a few lines in it:(

Ta
Si

"Cor" <no*@non.com> wrote in message
news:eg*************@tk2msftngp13.phx.gbl...
Hi MCN,

Show some code, I think it is one of your OleDb parameters?
(However withouth code this is a gues which maybe totaly wrong)

Cor

Nov 20 '05 #11

P: n/a
Cor
Armin?

I think it can be where you say

"Select A from table where A = @A"

That needed to be filled with a command parameter.

If you do not have that, than it is something else.
(It it is OleDb the parameter is something else)

Cor
Nov 20 '05 #12

P: n/a
Cor
Armin?

I think it can be where you say

"Select A from table where A = @A"

That needed to be filled with a command parameter.

If you do not have that, than it is something else.
(It it is OleDb the parameter is something else)

Cor
Nov 20 '05 #13

P: n/a
Cor,

I`ve been looking at your suggestion, and I think your right, On my code:

Me.odaArcirisUsers.Fill(dsArcirisUsers)
Me.odaArcirisRoles.Fill(dsArcirisUsers)
Me.odaBomAccess.Fill(dsArcirisUsers)
Me.odaSites.Fill(dsArcirisUsers)

If I Comment out `Me.odaArcirisUsers.Fill(dsArcirisUsers)` It runs without a
error. I`ve Re done my Data Adapeter for ArcirisUsers and Rebuild my Dataset
(See Attached Pic) but it still comes up with the error if I un Comment it:(

Also if I right click on my Data Adapter and try to Preview my Dataset it
errors with the same message:(

Any Ideas?

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
Armin?

I think it can be where you say

"Select A from table where A = @A"

That needed to be filled with a command parameter.

If you do not have that, than it is something else.
(It it is OleDb the parameter is something else)

Cor

Nov 20 '05 #14

P: n/a
Cor,

I`ve been looking at your suggestion, and I think your right, On my code:

Me.odaArcirisUsers.Fill(dsArcirisUsers)
Me.odaArcirisRoles.Fill(dsArcirisUsers)
Me.odaBomAccess.Fill(dsArcirisUsers)
Me.odaSites.Fill(dsArcirisUsers)

If I Comment out `Me.odaArcirisUsers.Fill(dsArcirisUsers)` It runs without a
error. I`ve Re done my Data Adapeter for ArcirisUsers and Rebuild my Dataset
(See Attached Pic) but it still comes up with the error if I un Comment it:(

Also if I right click on my Data Adapter and try to Preview my Dataset it
errors with the same message:(

Any Ideas?

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:us**************@tk2msftngp13.phx.gbl...
Armin?

I think it can be where you say

"Select A from table where A = @A"

That needed to be filled with a command parameter.

If you do not have that, than it is something else.
(It it is OleDb the parameter is something else)

Cor

Nov 20 '05 #15

P: n/a
Cor,

Sorry i`ve just notice in ther Data Adapter Query Builder there was a Coloum
which wasn`t related to a Table:(

Thats working Now, but now im getting "Failed to Enable Constraints. One or
more rows contain values wiolating non-null, unique, or foreign-key
contraints"

Many Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Wv********************@karoo.co.uk...
Hey Group,

I keep getting a error saying "No Value Given For One Or More Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I run
through my code line by line, so I can see which line is faulting?

Regards
MCN

Nov 20 '05 #16

P: n/a
Cor,

Sorry i`ve just notice in ther Data Adapter Query Builder there was a Coloum
which wasn`t related to a Table:(

Thats working Now, but now im getting "Failed to Enable Constraints. One or
more rows contain values wiolating non-null, unique, or foreign-key
contraints"

Many Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Wv********************@karoo.co.uk...
Hey Group,

I keep getting a error saying "No Value Given For One Or More Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I run
through my code line by line, so I can see which line is faulting?

Regards
MCN

Nov 20 '05 #17

P: n/a
Cor
MCN,

I think that you than first have to look at the data you have inserted in
the tables in your database.

And do not forget to use the keys in your select statements, I thought that
could give this kind of errors also, however I am not sure of that.

Cor
Nov 20 '05 #18

P: n/a
Cor
MCN,

I think that you than first have to look at the data you have inserted in
the tables in your database.

And do not forget to use the keys in your select statements, I thought that
could give this kind of errors also, however I am not sure of that.

Cor
Nov 20 '05 #19

P: n/a
Cor,

I`ve been looking at this, and its deffinatly now something to do with my
Dataset Bindings (I think). Now im getting an error saying "Foreign Key
Contraint "SiteArcirsUsers" Requires the Child Key Value (1) to exsist in
the Parent Table"

Any Ideas?

Im wondering if I have my relationships are set the wrong way round. As my
Arciris Users Table Looks up the SiteName from My Sites table, the BomAccess
from my BomAceess table, and my Role from My Roles Table. I would have
guessed that my Sites Table is the Parent as it can have many Arciris Users,
as with My BomAccess Table and my Roles Table. Or am I barking up the wrong
tree?

Many Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Wv********************@karoo.co.uk...
Hey Group,

I keep getting a error saying "No Value Given For One Or More Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I run
through my code line by line, so I can see which line is faulting?

Regards
MCN

Nov 20 '05 #20

P: n/a
Cor,

I`ve been looking at this, and its deffinatly now something to do with my
Dataset Bindings (I think). Now im getting an error saying "Foreign Key
Contraint "SiteArcirsUsers" Requires the Child Key Value (1) to exsist in
the Parent Table"

Any Ideas?

Im wondering if I have my relationships are set the wrong way round. As my
Arciris Users Table Looks up the SiteName from My Sites table, the BomAccess
from my BomAceess table, and my Role from My Roles Table. I would have
guessed that my Sites Table is the Parent as it can have many Arciris Users,
as with My BomAccess Table and my Roles Table. Or am I barking up the wrong
tree?

Many Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Wv********************@karoo.co.uk...
Hey Group,

I keep getting a error saying "No Value Given For One Or More Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I run
through my code line by line, so I can see which line is faulting?

Regards
MCN

Nov 20 '05 #21

P: n/a
Cor
Hi,

MCN are you sure the keys are a part of all your select,

with that I mean either

select * from BomAcess
or
Select BomAccessId, Accesslevel from BomAccess

Cor
Nov 20 '05 #22

P: n/a
Cor
Hi,

MCN are you sure the keys are a part of all your select,

with that I mean either

select * from BomAcess
or
Select BomAccessId, Accesslevel from BomAccess

Cor
Nov 20 '05 #23

P: n/a
"Armin Zingler" <az*******@freenet.de> schrieb
"MadCrazyNewbie" <te**@nospam.com> schrieb
No. I run my prog, click on my ToolBar button, which fills quite
a few datasets and verios other things, but when i click it it
just pops up and says ""No Value Given For One Or More Parameters".
With a OK button, when I click OK my prog carries on:(


Press Ctrl+Break when you see the message and have a look at the
callstack to see (from) where and why the message is shown.


....and of course also at the source code...
--
Armin

Nov 20 '05 #24

P: n/a
"Armin Zingler" <az*******@freenet.de> schrieb
"MadCrazyNewbie" <te**@nospam.com> schrieb
No. I run my prog, click on my ToolBar button, which fills quite
a few datasets and verios other things, but when i click it it
just pops up and says ""No Value Given For One Or More Parameters".
With a OK button, when I click OK my prog carries on:(


Press Ctrl+Break when you see the message and have a look at the
callstack to see (from) where and why the message is shown.


....and of course also at the source code...
--
Armin

Nov 20 '05 #25

P: n/a
Cor,

I have the following Select Statements:

From my odaArcirisRoles: SELECT ArcirisRolesID, Roles FROM ArcirisRoles
From my odaSites: SELECT Address, [E-Mail], Fax, Postcode, Site, SitesID,
Tel, Town FROM Sites
From my odaBomAccess: SELECT AccessLevel, BomAccessID FROM BomAccess
From my odaAricirsUsers: SELECT ArcirisRolesID, ArcirisUsersID, BomAccessID,
BomUsersName, Notes, [Password], POSID, SetupDate, SitesID, Usersname FROM
ArcirisUsers

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:Og**************@TK2MSFTNGP10.phx.gbl...
Hi,

MCN are you sure the keys are a part of all your select,

with that I mean either

select * from BomAcess
or
Select BomAccessId, Accesslevel from BomAccess

Cor

Nov 20 '05 #26

P: n/a
Cor,

I have the following Select Statements:

From my odaArcirisRoles: SELECT ArcirisRolesID, Roles FROM ArcirisRoles
From my odaSites: SELECT Address, [E-Mail], Fax, Postcode, Site, SitesID,
Tel, Town FROM Sites
From my odaBomAccess: SELECT AccessLevel, BomAccessID FROM BomAccess
From my odaAricirsUsers: SELECT ArcirisRolesID, ArcirisUsersID, BomAccessID,
BomUsersName, Notes, [Password], POSID, SetupDate, SitesID, Usersname FROM
ArcirisUsers

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:Og**************@TK2MSFTNGP10.phx.gbl...
Hi,

MCN are you sure the keys are a part of all your select,

with that I mean either

select * from BomAcess
or
Select BomAccessId, Accesslevel from BomAccess

Cor

Nov 20 '05 #27

P: n/a
Cor
Hi MCN,

Any reason for not just a *, you use all datanames (However you have to know
I hate SQL and do not rely to much in that on me). I see also, which cannot
have to do with it, that in your sample you use BomUsersNam and in the
select BomUsersName with a * that is no problem (or is that the field size
in the picture).

And what is the reason you made those relations in your database where you
are not using them in your select?

Just some thougths,

Cor
Nov 20 '05 #28

P: n/a
Cor
Hi MCN,

Any reason for not just a *, you use all datanames (However you have to know
I hate SQL and do not rely to much in that on me). I see also, which cannot
have to do with it, that in your sample you use BomUsersNam and in the
select BomUsersName with a * that is no problem (or is that the field size
in the picture).

And what is the reason you made those relations in your database where you
are not using them in your select?

Just some thougths,

Cor
Nov 20 '05 #29

P: n/a
Sorry Cor, what do you mean by:
And what is the reason you made those relations in your database where you
are not using them in your select?
I build a seperate DataAdapter for each Table then bind that in the Dataset.

Then I use the following code to fill them:

cmDsPasswordList = BindingContext(dsPasswordList, "PasswordList")
cmDsArcirisUsers = BindingContext(dsArcirisUsers, "ArcirisUsers")
mlLoading = True
'Start of Fill Datasets
Try
dsPasswordList.EnforceConstraints = False
Try
Me.odcPasswordLists.Open()
'Fill Password Lists Datasets
Me.odaDepartments.Fill(dsPasswordList)
Me.odaPasswordList.Fill(dsPasswordList)
'Fill Arciris Users Datasets
Me.odaArcirisUsers.Fill(dsArcirisUsers)
'Me.odaArcirisRoles.Fill(dsArcirisUsers)
'Me.odaBomAccess.Fill(dsArcirisUsers)
'Me.odaSites.Fill(dsArcirisUsers)
Catch fillException As System.Exception
Throw fillException
Finally
dsPasswordList.EnforceConstraints = True
Me.odcPasswordLists.Close()
End Try
Catch eLoad As System.Exception
System.Windows.Forms.MessageBox.Show(eLoad.Message )
Finally
mlLoading = False
End Try

I think it was the pic aswell, i`ve check and it BomUsersName on both.

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:uh*************@TK2MSFTNGP12.phx.gbl... Hi MCN,

Any reason for not just a *, you use all datanames (However you have to know I hate SQL and do not rely to much in that on me). I see also, which cannot have to do with it, that in your sample you use BomUsersNam and in the
select BomUsersName with a * that is no problem (or is that the field size
in the picture).

And what is the reason you made those relations in your database where you
are not using them in your select?

Just some thougths,

Cor

Nov 20 '05 #30

P: n/a
Sorry Cor, what do you mean by:
And what is the reason you made those relations in your database where you
are not using them in your select?
I build a seperate DataAdapter for each Table then bind that in the Dataset.

Then I use the following code to fill them:

cmDsPasswordList = BindingContext(dsPasswordList, "PasswordList")
cmDsArcirisUsers = BindingContext(dsArcirisUsers, "ArcirisUsers")
mlLoading = True
'Start of Fill Datasets
Try
dsPasswordList.EnforceConstraints = False
Try
Me.odcPasswordLists.Open()
'Fill Password Lists Datasets
Me.odaDepartments.Fill(dsPasswordList)
Me.odaPasswordList.Fill(dsPasswordList)
'Fill Arciris Users Datasets
Me.odaArcirisUsers.Fill(dsArcirisUsers)
'Me.odaArcirisRoles.Fill(dsArcirisUsers)
'Me.odaBomAccess.Fill(dsArcirisUsers)
'Me.odaSites.Fill(dsArcirisUsers)
Catch fillException As System.Exception
Throw fillException
Finally
dsPasswordList.EnforceConstraints = True
Me.odcPasswordLists.Close()
End Try
Catch eLoad As System.Exception
System.Windows.Forms.MessageBox.Show(eLoad.Message )
Finally
mlLoading = False
End Try

I think it was the pic aswell, i`ve check and it BomUsersName on both.

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:uh*************@TK2MSFTNGP12.phx.gbl... Hi MCN,

Any reason for not just a *, you use all datanames (However you have to know I hate SQL and do not rely to much in that on me). I see also, which cannot have to do with it, that in your sample you use BomUsersNam and in the
select BomUsersName with a * that is no problem (or is that the field size
in the picture).

And what is the reason you made those relations in your database where you
are not using them in your select?

Just some thougths,

Cor

Nov 20 '05 #31

P: n/a
Cor
Hi MCN,

If that column is false it should give an error of course.

Cor
Nov 20 '05 #32

P: n/a
Cor
Hi MCN,

If that column is false it should give an error of course.

Cor
Nov 20 '05 #33

P: n/a
Cor,

If I delete my relations in my dataset it, works, well dosn`t give me any
errors, so its deffo to do with my bindings.

Can you see anything wrong, with my XML Schema below?

<?xml version="1.0" standalone="yes" ?>
<xs:schema id="dsArcirisUsers"
targetNamespace="http://www.tempuri.org/dsArcirisUsers.xsd"
xmlns:mstns="http://www.tempuri.org/dsArcirisUsers.xsd"
xmlns="http://www.tempuri.org/dsArcirisUsers.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="dsArcirisUsers" msdata:IsDataSet="true"
msdata:Locale="en-GB">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="ArcirisRoles">
<xs:complexType>
<xs:sequence>
<xs:element name="ArcirisRolesID" msdata:AutoIncrement="true" type="xs:int"
/>
<xs:element name="Roles" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ArcirisUsers">
<xs:complexType>
<xs:sequence>
<xs:element name="ArcirisRolesID" type="xs:int" minOccurs="0" />
<xs:element name="ArcirisUsersID" msdata:AutoIncrement="true" type="xs:int"
/>
<xs:element name="BomAccessID" type="xs:int" minOccurs="0" />
<xs:element name="BomUsersName" type="xs:string" minOccurs="0" />
<xs:element name="Notes" type="xs:string" minOccurs="0" />
<xs:element name="Password" type="xs:string" minOccurs="0" />
<xs:element name="POSID" type="xs:double" minOccurs="0" />
<xs:element name="SetupDate" type="xs:dateTime" minOccurs="0" />
<xs:element name="SitesID" type="xs:int" minOccurs="0" />
<xs:element name="Usersname" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BomAccess">
<xs:complexType>
<xs:sequence>
<xs:element name="AccessLevel" type="xs:string" minOccurs="0" />
<xs:element name="BomAccessID" msdata:AutoIncrement="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Sites">
<xs:complexType>
<xs:sequence>
<xs:element name="Address" type="xs:string" minOccurs="0" />
<xs:element name="E-Mail" type="xs:string" minOccurs="0" />
<xs:element name="Fax" type="xs:string" minOccurs="0" />
<xs:element name="Postcode" type="xs:string" minOccurs="0" />
<xs:element name="Site" type="xs:string" minOccurs="0" />
<xs:element name="SitesID" msdata:AutoIncrement="true" type="xs:int" />
<xs:element name="Tel" type="xs:string" minOccurs="0" />
<xs:element name="Town" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ArcirisRoles" />
<xs:field xpath="mstns:ArcirisRolesID" />
</xs:unique>
<xs:unique name="ArcirisUsers_Constraint1"
msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:ArcirisUsersID" />
</xs:unique>
<xs:unique name="BomAccess_Constraint1" msdata:ConstraintName="Constraint1"
msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:BomAccess" />
<xs:field xpath="mstns:BomAccessID" />
</xs:unique>
<xs:unique name="Sites_Constraint1" msdata:ConstraintName="Constraint1"
msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Sites" />
<xs:field xpath="mstns:SitesID" />
</xs:unique>
<xs:keyref name="ArcirisRolesArcirisUsers" refer="mstns:Constraint1"
msdata:AcceptRejectRule="Cascade" msdata:DeleteRule="Cascade"
msdata:UpdateRule="Cascade">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:ArcirisRolesID" />
</xs:keyref>
<xs:keyref name="BomAccessArcirisUsers" refer="mstns:BomAccess_Constraint1"
msdata:AcceptRejectRule="Cascade" msdata:DeleteRule="Cascade"
msdata:UpdateRule="Cascade">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:BomAccessID" />
</xs:keyref>
<xs:keyref name="SitesArcirisUsers" refer="mstns:Sites_Constraint1"
msdata:AcceptRejectRule="Cascade" msdata:DeleteRule="Cascade"
msdata:UpdateRule="Cascade">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:SitesID" />
</xs:keyref>
</xs:element>
</xs:schema>

Many Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Sb********************@karoo.co.uk...
Sorry Cor, what do you mean by:
And what is the reason you made those relations in your database where you are not using them in your select?
I build a seperate DataAdapter for each Table then bind that in the

Dataset.
Then I use the following code to fill them:

cmDsPasswordList = BindingContext(dsPasswordList, "PasswordList")
cmDsArcirisUsers = BindingContext(dsArcirisUsers, "ArcirisUsers")
mlLoading = True
'Start of Fill Datasets
Try
dsPasswordList.EnforceConstraints = False
Try
Me.odcPasswordLists.Open()
'Fill Password Lists Datasets
Me.odaDepartments.Fill(dsPasswordList)
Me.odaPasswordList.Fill(dsPasswordList)
'Fill Arciris Users Datasets
Me.odaArcirisUsers.Fill(dsArcirisUsers)
'Me.odaArcirisRoles.Fill(dsArcirisUsers)
'Me.odaBomAccess.Fill(dsArcirisUsers)
'Me.odaSites.Fill(dsArcirisUsers)
Catch fillException As System.Exception
Throw fillException
Finally
dsPasswordList.EnforceConstraints = True
Me.odcPasswordLists.Close()
End Try
Catch eLoad As System.Exception
System.Windows.Forms.MessageBox.Show(eLoad.Message )
Finally
mlLoading = False
End Try

I think it was the pic aswell, i`ve check and it BomUsersName on both.

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:uh*************@TK2MSFTNGP12.phx.gbl...
Hi MCN,

Any reason for not just a *, you use all datanames (However you have to

know
I hate SQL and do not rely to much in that on me). I see also, which

cannot
have to do with it, that in your sample you use BomUsersNam and in the
select BomUsersName with a * that is no problem (or is that the field size in the picture).

And what is the reason you made those relations in your database where you are not using them in your select?

Just some thougths,

Cor


Nov 20 '05 #34

P: n/a
Cor,

If I delete my relations in my dataset it, works, well dosn`t give me any
errors, so its deffo to do with my bindings.

Can you see anything wrong, with my XML Schema below?

<?xml version="1.0" standalone="yes" ?>
<xs:schema id="dsArcirisUsers"
targetNamespace="http://www.tempuri.org/dsArcirisUsers.xsd"
xmlns:mstns="http://www.tempuri.org/dsArcirisUsers.xsd"
xmlns="http://www.tempuri.org/dsArcirisUsers.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="dsArcirisUsers" msdata:IsDataSet="true"
msdata:Locale="en-GB">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="ArcirisRoles">
<xs:complexType>
<xs:sequence>
<xs:element name="ArcirisRolesID" msdata:AutoIncrement="true" type="xs:int"
/>
<xs:element name="Roles" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ArcirisUsers">
<xs:complexType>
<xs:sequence>
<xs:element name="ArcirisRolesID" type="xs:int" minOccurs="0" />
<xs:element name="ArcirisUsersID" msdata:AutoIncrement="true" type="xs:int"
/>
<xs:element name="BomAccessID" type="xs:int" minOccurs="0" />
<xs:element name="BomUsersName" type="xs:string" minOccurs="0" />
<xs:element name="Notes" type="xs:string" minOccurs="0" />
<xs:element name="Password" type="xs:string" minOccurs="0" />
<xs:element name="POSID" type="xs:double" minOccurs="0" />
<xs:element name="SetupDate" type="xs:dateTime" minOccurs="0" />
<xs:element name="SitesID" type="xs:int" minOccurs="0" />
<xs:element name="Usersname" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BomAccess">
<xs:complexType>
<xs:sequence>
<xs:element name="AccessLevel" type="xs:string" minOccurs="0" />
<xs:element name="BomAccessID" msdata:AutoIncrement="true" type="xs:int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Sites">
<xs:complexType>
<xs:sequence>
<xs:element name="Address" type="xs:string" minOccurs="0" />
<xs:element name="E-Mail" type="xs:string" minOccurs="0" />
<xs:element name="Fax" type="xs:string" minOccurs="0" />
<xs:element name="Postcode" type="xs:string" minOccurs="0" />
<xs:element name="Site" type="xs:string" minOccurs="0" />
<xs:element name="SitesID" msdata:AutoIncrement="true" type="xs:int" />
<xs:element name="Tel" type="xs:string" minOccurs="0" />
<xs:element name="Town" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ArcirisRoles" />
<xs:field xpath="mstns:ArcirisRolesID" />
</xs:unique>
<xs:unique name="ArcirisUsers_Constraint1"
msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:ArcirisUsersID" />
</xs:unique>
<xs:unique name="BomAccess_Constraint1" msdata:ConstraintName="Constraint1"
msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:BomAccess" />
<xs:field xpath="mstns:BomAccessID" />
</xs:unique>
<xs:unique name="Sites_Constraint1" msdata:ConstraintName="Constraint1"
msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:Sites" />
<xs:field xpath="mstns:SitesID" />
</xs:unique>
<xs:keyref name="ArcirisRolesArcirisUsers" refer="mstns:Constraint1"
msdata:AcceptRejectRule="Cascade" msdata:DeleteRule="Cascade"
msdata:UpdateRule="Cascade">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:ArcirisRolesID" />
</xs:keyref>
<xs:keyref name="BomAccessArcirisUsers" refer="mstns:BomAccess_Constraint1"
msdata:AcceptRejectRule="Cascade" msdata:DeleteRule="Cascade"
msdata:UpdateRule="Cascade">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:BomAccessID" />
</xs:keyref>
<xs:keyref name="SitesArcirisUsers" refer="mstns:Sites_Constraint1"
msdata:AcceptRejectRule="Cascade" msdata:DeleteRule="Cascade"
msdata:UpdateRule="Cascade">
<xs:selector xpath=".//mstns:ArcirisUsers" />
<xs:field xpath="mstns:SitesID" />
</xs:keyref>
</xs:element>
</xs:schema>

Many Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Sb********************@karoo.co.uk...
Sorry Cor, what do you mean by:
And what is the reason you made those relations in your database where you are not using them in your select?
I build a seperate DataAdapter for each Table then bind that in the

Dataset.
Then I use the following code to fill them:

cmDsPasswordList = BindingContext(dsPasswordList, "PasswordList")
cmDsArcirisUsers = BindingContext(dsArcirisUsers, "ArcirisUsers")
mlLoading = True
'Start of Fill Datasets
Try
dsPasswordList.EnforceConstraints = False
Try
Me.odcPasswordLists.Open()
'Fill Password Lists Datasets
Me.odaDepartments.Fill(dsPasswordList)
Me.odaPasswordList.Fill(dsPasswordList)
'Fill Arciris Users Datasets
Me.odaArcirisUsers.Fill(dsArcirisUsers)
'Me.odaArcirisRoles.Fill(dsArcirisUsers)
'Me.odaBomAccess.Fill(dsArcirisUsers)
'Me.odaSites.Fill(dsArcirisUsers)
Catch fillException As System.Exception
Throw fillException
Finally
dsPasswordList.EnforceConstraints = True
Me.odcPasswordLists.Close()
End Try
Catch eLoad As System.Exception
System.Windows.Forms.MessageBox.Show(eLoad.Message )
Finally
mlLoading = False
End Try

I think it was the pic aswell, i`ve check and it BomUsersName on both.

Ta
MCN

"Cor" <no*@non.com> wrote in message
news:uh*************@TK2MSFTNGP12.phx.gbl...
Hi MCN,

Any reason for not just a *, you use all datanames (However you have to

know
I hate SQL and do not rely to much in that on me). I see also, which

cannot
have to do with it, that in your sample you use BomUsersNam and in the
select BomUsersName with a * that is no problem (or is that the field size in the picture).

And what is the reason you made those relations in your database where you are not using them in your select?

Just some thougths,

Cor


Nov 20 '05 #35

P: n/a
Cor
Hi MCN

I see also no problems, maybe I am blind or just do not know something
It are 4 seperated tables that you read in a dataset using 4 different
dataadapters.
I do not see what is the importance of the key in that.

However I think the best you can do is put that code without the picture but
with the selects in the newsgroup
microsoft.public.dotnet.framework.adonet
And do not tell I did look for it.
I will also watch who sees it.

Cor
Nov 20 '05 #36

P: n/a
Cor
Hi MCN

I see also no problems, maybe I am blind or just do not know something
It are 4 seperated tables that you read in a dataset using 4 different
dataadapters.
I do not see what is the importance of the key in that.

However I think the best you can do is put that code without the picture but
with the selects in the newsgroup
microsoft.public.dotnet.framework.adonet
And do not tell I did look for it.
I will also watch who sees it.

Cor
Nov 20 '05 #37

P: n/a
OK cor i`ll try that,

Many thanks
MCN

"Cor" <no*@non.com> wrote in message
news:Oi**************@tk2msftngp13.phx.gbl...
Hi MCN

I see also no problems, maybe I am blind or just do not know something
It are 4 seperated tables that you read in a dataset using 4 different
dataadapters.
I do not see what is the importance of the key in that.

However I think the best you can do is put that code without the picture but with the selects in the newsgroup
microsoft.public.dotnet.framework.adonet
And do not tell I did look for it.
I will also watch who sees it.

Cor

Nov 20 '05 #38

P: n/a
OK cor i`ll try that,

Many thanks
MCN

"Cor" <no*@non.com> wrote in message
news:Oi**************@tk2msftngp13.phx.gbl...
Hi MCN

I see also no problems, maybe I am blind or just do not know something
It are 4 seperated tables that you read in a dataset using 4 different
dataadapters.
I do not see what is the importance of the key in that.

However I think the best you can do is put that code without the picture but with the selects in the newsgroup
microsoft.public.dotnet.framework.adonet
And do not tell I did look for it.
I will also watch who sees it.

Cor

Nov 20 '05 #39

P: n/a
Cor
Hi Mad,

This is the error

Now im getting an error saying "Foreign Key
Contraint "SiteArcirsUsers" Requires the Child Key Value (1) to exsist in
the Parent Table"

In my opinion that has nothing to do with your datatable however it says
that it needs a Value to exist in the parent table, there are 3 parent
tables in your schema.

Can you change the select from the SiteArcirsUser temporary to

SELECT * FROM ArcirisUsers WHERE ArcirisUsersId = 1 ' a user which exist
and than what happens (and if gives the error if is true that the parent
values do not exist?)

Cor


Nov 20 '05 #40

P: n/a
Cor
Hi Mad,

This is the error

Now im getting an error saying "Foreign Key
Contraint "SiteArcirsUsers" Requires the Child Key Value (1) to exsist in
the Parent Table"

In my opinion that has nothing to do with your datatable however it says
that it needs a Value to exist in the parent table, there are 3 parent
tables in your schema.

Can you change the select from the SiteArcirsUser temporary to

SELECT * FROM ArcirisUsers WHERE ArcirisUsersId = 1 ' a user which exist
and than what happens (and if gives the error if is true that the parent
values do not exist?)

Cor


Nov 20 '05 #41

P: n/a
Cor,

I`ve figured this one out, it was so obvious aswell, i bet you will kick
youself, i sure did:-

I was filling the Child table first then filling my Parent tables, swapped
it round so it filled my parent table first the my child tables, and now its
fine.

Just thought I would let ya know

Ta
Si

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Wv********************@karoo.co.uk...
Hey Group,

I keep getting a error saying "No Value Given For One Or More Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I run
through my code line by line, so I can see which line is faulting?

Regards
MCN

Nov 20 '05 #42

P: n/a
Cor,

I`ve figured this one out, it was so obvious aswell, i bet you will kick
youself, i sure did:-

I was filling the Child table first then filling my Parent tables, swapped
it round so it filled my parent table first the my child tables, and now its
fine.

Just thought I would let ya know

Ta
Si

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:Wv********************@karoo.co.uk...
Hey Group,

I keep getting a error saying "No Value Given For One Or More Parameters".

Unfortunatly I don`t know where this error is coming from:(. Can I run
through my code line by line, so I can see which line is faulting?

Regards
MCN

Nov 20 '05 #43

P: n/a
Hi MCN,

I told you I should be blind.

And this is so obvious, oh my, however I think this I never forget

Thanks, kicks yes

:-)

Cor
Nov 20 '05 #44

P: n/a
Hi MCN,

I told you I should be blind.

And this is so obvious, oh my, however I think this I never forget

Thanks, kicks yes

:-)

Cor
Nov 20 '05 #45

This discussion thread is closed

Replies have been disabled for this discussion.