473,320 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Can't I use a parameter with containstable in a strongly typed dataset?

Hello,

I have been trying the DataSet in VS2005, to see if it will simply some
basic data access. So far it seems very useful, but I have run into a
problem when trying to use a parameter for containstable (free text
searching).

If I enter a parameter in the containstable clause of a query...

containstable(TaxTips, TipTitle, 'isabout (@kwords)')

....then VS doesn't recognise it as a parameter, and marks the data
method as not taking any parameters.

I tried hacking the code of the .xsd file, but that didn't work, and is
also very flaky as VS will overwrite my changes as soon as I do anything
in the dataset designer.

So, anyone any ideas? I like the DataSet, but I need to be able to use
it with containstable. Can this be done?

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 19 '06 #1
2 1697
your parameter is wrapped with single quotes so it is treated as a
literal

change to

containstable(TaxTips, TipTitle, @kwords)

then set the value of @kwords to 'isabout ' + somevalue

where somevalue is a literal value
Alan Silver wrote:
Hello,

I have been trying the DataSet in VS2005, to see if it will simply some
basic data access. So far it seems very useful, but I have run into a
problem when trying to use a parameter for containstable (free text
searching).

If I enter a parameter in the containstable clause of a query...

containstable(TaxTips, TipTitle, 'isabout (@kwords)')

...then VS doesn't recognise it as a parameter, and marks the data
method as not taking any parameters.

I tried hacking the code of the .xsd file, but that didn't work, and is
also very flaky as VS will overwrite my changes as soon as I do anything
in the dataset designer.

So, anyone any ideas? I like the DataSet, but I need to be able to use
it with containstable. Can this be done?

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 20 '06 #2
In article <11**********************@b28g2000cwb.googlegroups .com>,
ne**********@gmail.com writes
>your parameter is wrapped with single quotes so it is treated as a
literal

change to

containstable(TaxTips, TipTitle, @kwords)

then set the value of @kwords to 'isabout ' + somevalue

where somevalue is a literal value
Thanks, I tried that after I posted, and couldn't get it to work. I
realised afterwards that the problem wasn't with the DataSet at all, it
was with a radiobutton value that I was checking. I was getting the
"wrong" results, not because the containstable wasn't working, but
because the wrong code was being called!!

Thanks for the help
>Alan Silver wrote:
>Hello,

I have been trying the DataSet in VS2005, to see if it will simply some
basic data access. So far it seems very useful, but I have run into a
problem when trying to use a parameter for containstable (free text
searching).

If I enter a parameter in the containstable clause of a query...

containstable(TaxTips, TipTitle, 'isabout (@kwords)')

...then VS doesn't recognise it as a parameter, and marks the data
method as not taking any parameters.

I tried hacking the code of the .xsd file, but that didn't work, and is
also very flaky as VS will overwrite my changes as soon as I do anything
in the dataset designer.

So, anyone any ideas? I like the DataSet, but I need to be able to use
it with containstable. Can this be done?

--
Alan Silver
(anything added below this line is nothing to do with me)
--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 20 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: | last post by:
We have an object factory that returns weakly typed datasets (just plain ol' DataSet's). I need to cast it, or transform it, or map it to a strongly typed dataset. There's an old adage I heard...
2
by: theWizK | last post by:
Hello all. I have noticed that when I generate a strongly-typed dataset from an xml schema that the DataTables that are generated have their constructors marked as internal. What this means is...
1
by: Job Lot | last post by:
I am confused how strongly typed dataset is different from un-typed dataset. Is there any good link explaining pros and cons of both? Which one should be used preferably?
0
by: MT | last post by:
I have an xsd file that I use to create a strongly typed dataset in my project. In the past, I have used the ReadXml method to load xml files into the generated class and read data in using this...
2
by: David | last post by:
I have been developing applications with Java for quite a while but I am new to .NET development. I am trying to learn the ".NET way" of creating Strongly Typed Objects from a database. The...
1
by: Imran | last post by:
Hello, I have a typed dataset defined in my project. I am writing a user control which needs to invoke an instance of that dataset. Problem is that the page developer only provides the name of...
1
by: Andre Ranieri | last post by:
I'm designing an extranet web site that customers will use to log in and see their account history, make payments against their balance, etc. I've declared a strongly typed DataSet as a public...
3
by: Programatix | last post by:
Hi. I'm using a strongly typed dataset and I would like to get the index number of a column from a datarow. Is that possible? I would like to avoid using expression like this, ...
3
by: Jon B | last post by:
Hi There! I'm looking into Strongly Typed DataSets in the .NET Framework. I know it can generated strongly typed tables as objects and column names as properties. However, one thing that I...
1
by: Chris | last post by:
I have started using strongly typed datasets as the basis of my data access layer. They work well but can be a bit fiddly when adding columns. I have a column which refuses to "change". It is an...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.