How to pass parameters in ASP.NET Web Pages 2 query command for AS/400 oledb?

never

New Member
While reading ASP.NET Web pages info it saya that in order to pass parameters to the sql this works:\[code\]var db = database.open("myconnectionstring");var strSQL = "Select * from mytable where myfield=@0";var data = http://stackoverflow.com/questions/15511339/db.query(strSQL,"'" + @0 + "'");\[/code\]The above seems to work ok with sql express sql server e.t.c but i wan to use it in an AS400 DB2 db which is initialized in web.config as:\[code\] <add name="JDE" connectionString="Provider=IBMDA400.DataSource.1;Data Source=xx.xx.xx.xx;Persist Security Info=True;Password=xxxx;User ID=xxxx;Initial Catalog=ENTERSRV" providerName="System.Data.Oledb"/>\[/code\]I cant make it work, either with @0 or putting ? in place of parameter placeholders.Is there a way to make it work in Web Pages Framework?
 
Back
Top