Re: DataTable Designer in VS2008
- From: "Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
- Date: Sat, 23 Feb 2008 01:52:02 -0500
Your problem here is not with the designer but with the T-SQL language. In
Transact-SQL, the language used by SQL-Server, there is no such a construct
such as « WHERE primaryKeyID IN (@myPKList) » where @myPKList would be a
string representing a list of values; hence the impossibility of
representing this construct in the query designer.
You will find on the web many examples of SQL UDF (user defined functions)
taking a string parameter and returning a table:
http://www.google.com/search?q=sql+table+udf+split&rls=com.microsoft:en-ca:IE-SearchBox&ie=UTF-8&oe=UTF-8&sourceid=ie7&rlz=1I7GGLD
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Manfred Koschinski" <mako235@xxxxxxxxxxxxxx> wrote in message
news:e00JdqxYIHA.4332@xxxxxxxxxxxxxxxxxxxxxxx
Hello,
I guess my problem refers to VS2005 and 2008.
When I am in the visual dataset designer I can drag and drop a database
table (frim the server explorer) there. By that the VS automatically
creates the dataset schema for that table and also a fill method for the
data adapter.
That works very fine for me.
Now I can call "configure" on the data adapter and I can attach a WHERE
statement at the SELECT text that takes a parameter like
... WHERE primaryKeyID = @myPK
When I finish the wizard then the fill method is recreated and needs the
@myPK parameter.
That also works fine for me.
But when I want to have a WHERE statement like
... WHERE primaryKeyID IN (@myPKList)
then I get into trouble because my primary key column is of type integer
(or GUID or something like that) and the parameter @myPKList is a string
(comma separated values).
How can I get the disigner to handle my WHERE statement correctly?
Thanks for any help
Manfred
.
- Prev by Date: dataSet Insanity
- Next by Date: Re: dataSet Insanity
- Previous by thread: dataSet Insanity
- Next by thread: console app stdout redirection doesn't work under VS2008 debugger
- Index(es):
Relevant Pages
|