Hi,
Is it possible to have an if or case type statement in the SelectCommand in Formview?
I have a combobox and if the item doesn't exit I need to add it to the lookup table and then if it does exist, I need to just insert the value into the main table.
So it would be something like this...
...with no selectparameters, Edit/Insert/Delete options show up. If I use a variable in the select statement, it doesn't work:
SelectCommand="SELECT * from FROM [Product] where prodnum='2000'"
Page1:
<form id="form1" runat="server">
<asp:Label id="lblProdNum" runat="server"...
...Type. The second page takes the field and runs it in a select statement.
If I hard code the value, it works:
Dim strSQL As String = "SELECT * FROM ProductType where ProductType= 'Book';"
But if I add the variable, I get an error:
Dim strSQL As String = "SELECT * FROM ProductType where...
Yes but a bit different from what you listed:
C:\WINDOWS\system32\inetsrv\asp.dll instead of
C:\Windows\system32\asp.dll
Verbs: Limit to GET,HEAD,POST,TRACE
I did set the execute permissions to Scripts only:
Under IIS Manager/Web Sites I looked at the properties of the web site. Under the Home Directory tab under Application Settings, I set the following:
Application Name: Default Application
Starting Point: <Web site name.com>
Execute...
Hi,
My ASP files were running at a web host but when I copied them over to a different server, the ASP pages don't work. HTML pages do.
Under IIS/Web Sites I looked at the properties of the web site. Under the Home Directory tab under Application Settings, I set the following:
Application...
Hi,
I have a drop down list and once it's submitted, I'd like to display it again with the selected value. This works but then I have the value listed twice.
<select name="position">
<option selected>Choose One</option>
<option value="director">director</option>
<option...
I'm creating the database in Microsoft SQL Server Management Studio and set the Identity on the ID column.
I did use the Import and Export Wizard to export the database and I was wondering if it drops the identity on the ID field. I did try creating the table with the script Markros had but I...
Thanks for your help. I did try creating the table using the select statement above but it still didn't work. What I do next is export the database to the Web Host server and I get the error that the insert fails because of the id being null. The table I create on my server does have the...
Hi,
I have a table that has an ID field (integer) that is the Primary Key and it auto-increments.
When I try to add a record to the database, I get the following error:
Cannot insert the value NULL into column 'id', table 'group.dbo.tblmembers'; column does not allow nulls. INSERT fails.
If I...
That makes sense adding Math\NEnglish in the database and then doing the replace.
I tried adding <br> to the data in the database and it might not be the best way to do it but it seems to work:
strSQL = "Update tblProducts SET product = 'Math<br>English<br>Science' WHERE productid = 1"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.