Microsoft Visual Basic 2008, Professional Edition
I've run into a problem I can't figure out. I'm using VB 2008. I found the following sample code and was attempting to use it but am not understanding how to setup the query, I bolded it below.
I understand I need to go in and set up my own customer query in my database in order to use it like the example below.
Q) Do I setup the query on my table adapter or on the original table in the database (Maybe even some good info on how to setup these queries)?
Q)If I'm understanding this, once I setup the query correctly I should just have to put in a variable and it fill find all row(s) with that parameter that I can delete?
Q) When using the @XXXX in the query, do I have to then use that as my variable to pass the data I'm looking for or can I use and variable?
' Locate the row to delete.
Dim oldRegionRow As NorthwindDataSet.RegionRow
oldRegionRow = NorthwindDataSet._Region.FindByRegionID(5)
' Delete the row from the dataset
' Delete the row from the database
I was able to setup the following query on my database but per the example, I'm not sure I did it correctly:
SELECT Gene, FindMethod, TDiscovery, TReplicate, AA_A, AA_T, AA_G, AA_C, ImageFileName, Description, SpxReplicationItem, IconFileName, Complete, Image, Icon, Type,
UniqueID, Chromosome, Rarity, ParentGene, Name
WHERE (Gene = @genename)
I then tried using it as this:
tRow = PlazimorphDBDataSet.PlazimorphGenes.FillByGene(genename)
and got an error that it is not a member of the database.
Thank you for all the help! I've been searching this forum and the web in general and have found the best help here!
modified 1-Dec-12 15:44pm.