error parsing the query

Hi,

I have the following problem

Code


m_SQLDa.SelectCommand = New SqlCeCommand("Select * From tb_Projects Where pro_clnt_fk = @clnt_pk", mycon)
Dim para = m_SQLDa.SelectCommand.Parameters.Add("@clnt_pk", cmbClient.SelectedValue)
Dim m_DSETs As DataSet = New DataSet("m_DSETs")
m_SQLDa.Fill(m_DSETs, "tb_Projects")


It breaks in the last line of code when filling the dataset and it displays the following error


there was an error parsing the query [ token line number, token line offset,, token in error,,]

num.Par. : 1
num.Par. :47
Err.Par. :@clnt_pk


this problem didnt occur on the desktop PC

Matt

[880 byte] By [MattFalzon] at [2007-12-23]
# 1

Hi,

I have the following problem

Code


m_SQLDa.SelectCommand = New SqlCeCommand("Select * From tb_Projects Where pro_clnt_fk = @clnt_pk", mycon)
Dim para = m_SQLDa.SelectCommand.Parameters.Add("@clnt_pk", cmbClient.SelectedValue)
Dim m_DSETs As DataSet = New DataSet("m_DSETs")
m_SQLDa.Fill(m_DSETs, "tb_Projects")


It breaks in the last line of code when filling the dataset and it displays the following error


there was an error parsing the query [ token line number, token line offset,, token in error,,]

num.Par. : 1
num.Par. :47
Err.Par. :@clnt_pk


this problem didnt occur on the desktop PC

Matt

MattFalzon at 2007-8-30 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...
# 2

If you using SQL CE 2.0, it has no support for named parameter, you should use '?' instead.

Also, are you aware we have dedicated SQL CE/Mobile/Ev forum?

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=152&SiteID=1

IlyaTumanov at 2007-8-30 > top of Msdn Tech,Smart Device Development,.NET Compact Framework...