I can get the following statement to execute from the mysql command prompt but when I try to build a tableadapter with the visual studio 2008 dataset wizard I get an error.
set @strsql = Concat('SELECT tblcustomers.CustomerId, tblcustomers.FirstName, tblcustomers.LastName, tblcustomers.Address, tblcustomers.City, tblcustomers.State, tblcustomers.Zip, tblcustomers.Phone, tblcustomers.Email, tblcustomers.CompanyName, tblcards.PinId, tblcards.CardId, tblcards.DateIssued, tblcards.DateInactivated FROM tblcustomers Inner Join tblcards ON tblcustomers.CustomerId = tblcards.CustomerId ', p_filter);
Prepare stmt1 from @strsql; Execute stmt1; DEALLOCATE PREPARE stmt1;
I can build tableadapters for all stored procedures that do not contain user variables. Is there any way to rewrite this without the @strsql user variable? I tried the following but cannot get it to work.
Prepare stmt1 from Concat('SELECT tblcustomers.CustomerId, tblcustomers.FirstName, tblcustomers.LastName, tblcustomers.Address, tblcustomers.City, tblcustomers.State, tblcustomers.Zip, tblcustomers.Phone, tblcustomers.Email, tblcustomers.CompanyName, tblcards.PinId, tblcards.CardId, tblcards.DateIssued, tblcards.DateInactivated FROM tblcustomers Inner Join tblcards ON tblcustomers.CustomerId = tblcards.CustomerId ', p_filter);
Execute stmt1; DEALLOCATE PREPARE stmt1;