|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
paramertised select queryHi All
A lot of comments in replies to my posts in these newsgroups encourage me to use parametised queries to protect against injection attacks How can I return a datatable from a function by passing the function a sqlclient command object The command object only has executenonquery method or executereader and I need a datatable with the result set I am using vb.net 2005 and sql server express 2005 in a windows form application Regards Steve Steve,
You could assign the command object to a dataadapter's SelectCommand property, call the dataadapter's Fill method, sending it a datatable to be filled, and return the filled datatable. Kerry Moorman Show quoteHide quote "steve" wrote: > Hi All > > A lot of comments in replies to my posts in these newsgroups encourage me to > use parametised queries to protect against injection attacks > > How can I return a datatable from a function by passing the function a > sqlclient command object > > The command object only has executenonquery method or executereader and I > need a datatable with the result set > > I am using vb.net 2005 and sql server express 2005 in a windows form > application > > Regards > Steve > > > Hi Kerry
Thanks so much Worked a treat Regards Steve Show quoteHide quote "Kerry Moorman" <KerryMoor***@discussions.microsoft.com> wrote in message news:79426A2A-FD23-4917-B1A3-A669C258ECAD@microsoft.com... > Steve, > > You could assign the command object to a dataadapter's SelectCommand > property, call the dataadapter's Fill method, sending it a datatable to be > filled, and return the filled datatable. > > Kerry Moorman > > > "steve" wrote: > >> Hi All >> >> A lot of comments in replies to my posts in these newsgroups encourage me >> to >> use parametised queries to protect against injection attacks >> >> How can I return a datatable from a function by passing the function a >> sqlclient command object >> >> The command object only has executenonquery method or executereader and I >> need a datatable with the result set >> >> I am using vb.net 2005 and sql server express 2005 in a windows form >> application >> >> Regards >> Steve >> >> >>
processor time
Visual Basic.Net & DBF files How can I convert a graphics object to image? Loop Question Multiple Select listbox and sql stored procedure -Help needed list of objects vs Array of objects sound capture (record audio input) in VB.NET???? Why this warning in IDE? Photoshop from vb Q: Excel files |
|||||||||||||||||||||||