Re: DataTable Designer in VS2008



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



.



Relevant Pages

  • Not first class in file
    ... loading the designer again. ... Public strTo As String ... ' This call is required by the Component Designer. ... Protected Overloads Overrides Sub Dispose ...
    (microsoft.public.dotnet.languages.vb)
  • Custom property on form not persisting value in VS 2005
    ... Private _Title As String ... - Then I go into class diagram to add the designer stuff... ... In the application I then add a form inheriting from the one in the class ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: 3 Fragen zu WebControl
    ... Definitiv sind aber die Werte für das Category-Attribut Englisch. ... Attribute haben nur einfluss auf die designer in VS nicht aufs aussehen ... public override string GetDesignTimeHtml() ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • Change Rave Report Connection String at runtime
    ... I've created some basic Rave Reports (using the designer which came ... with D2005) and I want to change the string for the database connection ... I can easily sort out the drive letter, but I can't seem to find the ...
    (comp.lang.pascal.delphi.misc)