Sql Statement Errors

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 assume is because the SQL query
is
wrong?

Could anybody please Point me in the right Direction?

Regards
Si
 
M

Miha Markic

Hi,

Try executing the query in Query Analyzer or some other tool if you are not
using SqlServer.
Then (after you get errors) try to cut out parts of the query to pinpoint
the problem.
 
C

Cor

Hi Miha,

I told newbie in the VB.language newsgroup that he could better get an
advice here because here are the SQL experts, and did also give him the same
advice as your second one.

I am happy you did gave that same advice as me.

:)

Cor
 
M

Miha Markic

Hi Cor,

Well, yes.
I presume he is using Access and one of the fields within query isn't typed
right or it doesn't exist at all.
So, it is impossible to solve the problem without knowing the table(s)
structure.
Thus the easiest solution is pinpointing IMO.
 
W

William Ryan

Newbie! There are a few things to look at. First, make sure both of the
tables have Primary Keys. If you used the configuration wizard, it should
warn you beforehand if you are missing the necessary key information.

Did the wizard tell you at the end that all of the statements were generated
correctly? It should be able to do the Select either way, but I'm guessing
it gave you some sort of indication at first, perhaps even with the table
mappings. Rerun it and verify you are getting a confirmation that
everything worked.

Also what method is throwing the exception? Fill or Update? I just created
the tables locally and I can fill no problem, but I couldn't generate a
valid update command and it's blowing up there. This seems to be different
from your problem, but I don't hve the whole schema...nonetheless, this may
well be the problem. Let me know and I'll do what I can.


Bill
 
W

William Ryan

You may also want to forego the whole joing thing and opt for a
DataRelation...just a thought.
William Ryan said:
Newbie! There are a few things to look at. First, make sure both of the
tables have Primary Keys. If you used the configuration wizard, it should
warn you beforehand if you are missing the necessary key information.

Did the wizard tell you at the end that all of the statements were generated
correctly? It should be able to do the Select either way, but I'm guessing
it gave you some sort of indication at first, perhaps even with the table
mappings. Rerun it and verify you are getting a confirmation that
everything worked.

Also what method is throwing the exception? Fill or Update? I just created
the tables locally and I can fill no problem, but I couldn't generate a
valid update command and it's blowing up there. This seems to be different
from your problem, but I don't hve the whole schema...nonetheless, this may
well be the problem. Let me know and I'll do what I can.


Bill
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 assume is because the SQL query
is
wrong?

Could anybody please Point me in the right Direction?

Regards
Si
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top