The correct syntax is Create Procedure InsertData @Account, @CompanyName, @Province As Begin Insert Into Customers (Account, CompanyName, Province) Values (@Account, @CompanyName, @Province) End
The idea is to use parameters (in both VFP and MSSQL), otherwise sooner or later someone would enter Rock'n'Roll as company name and your query will bomb because of those quotes. True, in VFP one could use double quotes or square brackets as delimiters, but the problem stays. As soon your data contain the character used as delimiter, the query will error. On Wed, Nov 23, 2011 at 9:17 PM, Rafael Copquin <[email protected]> wrote: > One more question. > > In VFP we can use quotes,double quotes or brackets to surround a literal > value or a string. > In SQL Server is there such thing, or we are forced to use only quotes? > > ie VFP > > cCmd = [insert into customers(account,companyname,province) > values('1234',"RAFAEL SOFTWARE",'BUENOS AIRES')] > > is the equivalent TSQL only this?: > cCmd = 'insert into customers(account,companyname,province) > values('1234','RAFAEL SOFTWARE','BUENOS AIRES')' > BTW, is that the correct syntax? > > Rafael Copquin > > > El 23/11/2011 15:26, Rafael Copquin escribió: >> Thank you both, Gianni and Fred >> Rafael >> >> >> El 23/11/2011 14:49, Rafael Copquin escribió: >>> I would like to follow a stored procedure behaviour line by line, as one >>> can do in VFP with the debugger. >>> I need to know what is the value of the parameters received by the SP >>> as they are passed from VFP via SPT, to determine why the heck the SP is >>> not working >>> >>> What are the commands in TSQL or the way to do it in SQL Server? >>> I mean, is there a menu option to check to start the debugger in SQL >>> Server Express or there is no such thing? >>> >>> TIA >>> >>> Rafael Copquin >>> >>> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAH=cqdjhzoh7hfy1q4oj3kkefh6pvxfmwpeojgtlvc72n9q...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

