JoTheCowgirl
New Member
Using Classic ASP, you can write out your dynamic sql command. <BR><BR>for SQL = ("Select * from qty where vcode='"&request.form("field")&"'")<BR>response.write (SQL) and have your sql statement written out<BR><BR>But how is it done in ASP.NET?You can do it pretty much the same way..<BR><BR>Just declare SQL as a varible in a <script language=vb runat=server>Dim SQL</script> tag, and just say<BR>SQL = "Select * from qty where vcode = " & request.form("field")<BR>response.write(SQL)<BR>You need to get rid of the myConnection stuff, so write out a separate variable . . . <BR><BR>myCommand=NEW SQLCommand("PUT QUERY HERE", myConnection)<BR>dim via as string<BR>SQL = ("PUT QUERY HERE")<BR><BR>response.write (SQL)