Sql Statement Error

  • Thread starter Thread starter Newbie!
  • Start date Start date
N

Newbie!

Hi Group,

Hope somebody could help? I have a table called ArcirisUsers which has a
field called SITES. I would like this field to pull a list of sites from the
Site feild in my SITES table. I have created the following SQL stement:

SELECT ArcirisUsers.Usersname, ArcirisUsers.POSID,
ArcirisUsers.POSAccess, ArcirisUsers.[Password], ArcirisUsers.LiveDate,
ArcirisUsers.BomID,
ArcirisUsers.BomAcc, ArcirisUsers.ArcirisUsersID,
Sites.[Site Name]
FROM ArcirisUsers INNER JOIN
Sites ON ArcirisUsers.PrimarySiteID = Sites.SitesID

However when I try and run this it comes back with a error saying "No Value
Given For One Or More Parameters"

When I try and create the above in my DataAdapter Wizard it comes back
telling me "Cannot Get DataScheme" Which I assum is because the SQL query is
wrong?

Could anybody please Point me in the right Direction?

Regards
Si
 
Hi Newbie,

Two answers
The best newsgroups to ask this are are SQL newsgroups and the newsgroup

news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet

As answer here, start making more simpler your SQL string till you get a
working situation, than you can make it back more complex.

That is as most people do to resolve this kind of problems.

I hope this helps?

Cor
 
Cor,

Thanks for your answer, how do you mean more easier, I used the DatAdapter
Command builder to build this, and as I don`t really know SQL im at bit of a
loss. I`ve looked at this and guess its something to do with the Join as
both tables build fine without the link:/

Ta
Si

Cor said:
Hi Newbie,

Two answers
The best newsgroups to ask this are are SQL newsgroups and the newsgroup

news://msnews.microsoft.com/microsoft.public.dotnet.framework.adonet

As answer here, start making more simpler your SQL string till you get a
working situation, than you can make it back more complex.

That is as most people do to resolve this kind of problems.

I hope this helps?

Cor
Hope somebody could help? I have a table called ArcirisUsers which has a
field called SITES. I would like this field to pull a list of sites from the
Site feild in my SITES table. I have created the following SQL stement:

SELECT ArcirisUsers.Usersname, ArcirisUsers.POSID,
ArcirisUsers.POSAccess, ArcirisUsers.[Password], ArcirisUsers.LiveDate,
ArcirisUsers.BomID,
ArcirisUsers.BomAcc, ArcirisUsers.ArcirisUsersID,
Sites.[Site Name]
FROM ArcirisUsers INNER JOIN
Sites ON ArcirisUsers.PrimarySiteID = Sites.SitesID

However when I try and run this it comes back with a error saying "No Value
Given For One Or More Parameters"

When I try and create the above in my DataAdapter Wizard it comes back
telling me "Cannot Get DataScheme" Which I assum is because the SQL
query
is
wrong?
 
Hi Newbie,

I am also no hero with SQL but I would delete everytime a part that I could
think it makes an error or maybe first start with a SQL statement as SELECT
* from ArcirisUsers

When it does give results, than I bring it back to the select I did wanted
before.

But that is how I would do it because I am not a SQL person (better "I hate
it")..

But there are in the adonet group who are good in it, and I saw you have
placed this message also there.

Cor
SELECT ArcirisUsers.Usersname, ArcirisUsers.POSID,
ArcirisUsers.POSAccess, ArcirisUsers.[Password], ArcirisUsers.LiveDate,
ArcirisUsers.BomID,
ArcirisUsers.BomAcc, ArcirisUsers.ArcirisUsersID,
Sites.[Site Name]
FROM ArcirisUsers INNER JOIN
Sites ON ArcirisUsers.PrimarySiteID = Sites.SitesID

However when I try and run this it comes back with a error saying "No Value
Given For One Or More Parameters"

When I try and create the above in my DataAdapter Wizard it comes back
telling me "Cannot Get DataScheme" Which I assum is because the SQL
query
is
wrong?
 
* "Newbie! said:
Hope somebody could help? I have a table called ArcirisUsers which has a
field called SITES. I would like this field to pull a list of sites from the
Site feild in my SITES table. I have created the following SQL stement:

SELECT ArcirisUsers.Usersname, ArcirisUsers.POSID,
ArcirisUsers.POSAccess, ArcirisUsers.[Password], ArcirisUsers.LiveDate,
ArcirisUsers.BomID,
ArcirisUsers.BomAcc, ArcirisUsers.ArcirisUsersID,
Sites.[Site Name]
FROM ArcirisUsers INNER JOIN
Sites ON ArcirisUsers.PrimarySiteID = Sites.SitesID

You will more likely get an answer here:

ADO.NET group:

<
Web interface:

<http://msdn.microsoft.com/newsgroup...roup=microsoft.public.dotnet.framework.adonet>
 
Hi,

Why are you using an inner join if you are not getting data from the
sites table?

Ken
 
he is .

Sites.[Site Name]


OHM
Hi,

Why are you using an inner join if you are not getting data
from the sites table?

Ken
-------------------
Newbie! said:
Hi Group,

Hope somebody could help? I have a table called ArcirisUsers which
has a field called SITES. I would like this field to pull a list of
sites from the
Site feild in my SITES table. I have created the following SQL
stement:

SELECT ArcirisUsers.Usersname, ArcirisUsers.POSID,
ArcirisUsers.POSAccess, ArcirisUsers.[Password],
ArcirisUsers.LiveDate, ArcirisUsers.BomID,
ArcirisUsers.BomAcc,
ArcirisUsers.ArcirisUsersID, Sites.[Site Name]
FROM ArcirisUsers INNER JOIN
Sites ON ArcirisUsers.PrimarySiteID =
Sites.SitesID

However when I try and run this it comes back with a error saying "No
Value
Given For One Or More Parameters"

When I try and create the above in my DataAdapter Wizard it comes
back telling me "Cannot Get DataScheme" Which I assum is because the
SQL query is
wrong?

Could anybody please Point me in the right Direction?

Regards
Si
 
Hi,

Sorry I missed that

Ken
---------
One Handed Man said:
he is .

Sites.[Site Name]


OHM
Hi,

Why are you using an inner join if you are not getting data
from the sites table?

Ken
-------------------
Newbie! said:
Hi Group,

Hope somebody could help? I have a table called ArcirisUsers which
has a field called SITES. I would like this field to pull a list of
sites from the
Site feild in my SITES table. I have created the following SQL
stement:

SELECT ArcirisUsers.Usersname, ArcirisUsers.POSID,
ArcirisUsers.POSAccess, ArcirisUsers.[Password],
ArcirisUsers.LiveDate, ArcirisUsers.BomID,
ArcirisUsers.BomAcc,
ArcirisUsers.ArcirisUsersID, Sites.[Site Name]
FROM ArcirisUsers INNER JOIN
Sites ON ArcirisUsers.PrimarySiteID =
Sites.SitesID

However when I try and run this it comes back with a error saying "No
Value
Given For One Or More Parameters"

When I try and create the above in my DataAdapter Wizard it comes
back telling me "Cannot Get DataScheme" Which I assum is because the
SQL query is
wrong?

Could anybody please Point me in the right Direction?

Regards
Si
 
Back
Top