Ok... I am scrapping the hole idea of the Formview and going with a
simple form with parameters in the code behind. As the code below
shows the data is submitted off the click of the button to table 1
(Catalog)
Where and how do I implement the Select @@Identity.
I need catID and imgID passed to table 2 CatalogImage
--------------.ASPX PAGE-------------
<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="CatalogAdd.aspx.vb" Inherits="admin_CatalogAdd" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
<asp:AccessDataSource ID="CatalogDataSource"
runat="server" DataFile="~/App_Data/DATABASE.mdb"
DeleteCommand="DELETE FROM [Catalog] WHERE [catID] = ?"
InsertCommand="INSERT INTO [Catalog] ([catNum], [catPrice],
[catDescription], [imgID], [venID], [subID]) VALUES (?, ?, ?, ?, ?,
?)"
SelectCommand="SELECT [catID], [catNum], [catPrice],
[catDescription], [imgID], [venID], [subID] FROM [Catalog]"
UpdateCommand="UPDATE [Catalog] SET [catNum] = ?,
[catPrice] = ?, [catDescription] = ?, [imgID] = ?, [venID] = ?,
[subID] = ? WHERE [catID] = ?">
<DeleteParameters>
<asp

arameter Name="catID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp

arameter Name="catNum" Type="Int32" />
<asp

arameter Name="catPrice" Type="Int32" />
<asp

arameter Name="catDescription" Type="String" />
<asp

arameter Name="imgID" Type="Int32" />
<asp

arameter Name="venID" Type="Int32" />
<asp

arameter Name="subID" Type="Int32" />
<asp

arameter Name="catID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp

arameter Name="catNum" Type="Int32" />
<asp

arameter Name="catPrice" Type="Int32" />
<asp

arameter Name="catDescription" Type="String" />
<asp

arameter Name="imgID" Type="Int32" />
<asp

arameter Name="venID" Type="Int32" />
<asp

arameter Name="subID" Type="Int32" />
</InsertParameters>
</asp:AccessDataSource>
<asp:AccessDataSource ID="ImageDataSource" runat="server"
DataFile="~/App_Data/DATABASE.mdb"
SelectCommand="SELECT [imgID], [imgName] FROM [Images]
ORDER BY [imgName]"></asp:AccessDataSource>
</div>
<asp:AccessDataSource ID="VendorDataSource" runat="server"
DataFile="~/App_Data/DATABASE.mdb"
DeleteCommand="DELETE FROM [Vendors] WHERE [venID] = ?"
InsertCommand="INSERT INTO [Vendors] ([venID], [venName]) VALUES (?,
?)"
SelectCommand="SELECT [venID], [venName] FROM [Vendors]
ORDER BY [venName]" UpdateCommand="UPDATE [Vendors] SET [venName] = ?
WHERE [venID] = ?">
<DeleteParameters>
<asp

arameter Name="venID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp

arameter Name="venName" Type="String" />
<asp

arameter Name="venID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp

arameter Name="venID" Type="Int32" />
<asp

arameter Name="venName" Type="String" />
</InsertParameters>
</asp:AccessDataSource>
<asp:AccessDataSource ID="CategoryDataSource" runat="server"
DataFile="~/App_Data/DATABASE.mdb"
DeleteCommand="DELETE FROM [SubCategory] WHERE [subID] =
?" InsertCommand="INSERT INTO [SubCategory] ([subID], [SubCategory])
VALUES (?, ?)"
SelectCommand="SELECT [subID], [SubCategory] FROM
[SubCategory] ORDER BY [SubCategory]"
UpdateCommand="UPDATE [SubCategory] SET [SubCategory] = ?
WHERE [subID] = ?">
<DeleteParameters>
<asp

arameter Name="subID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp

arameter Name="SubCategory" Type="String" />
<asp

arameter Name="subID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp

arameter Name="subID" Type="Int32" />
<asp

arameter Name="SubCategory" Type="String" />
</InsertParameters>
</asp:AccessDataSource>
<br />
<br />
<asp:Label ID="Label1" runat="server" Style="position: static"
Text="Item"></asp:Label>
<asp:TextBox ID="catNumTxt" runat="server" Style="position:
static"></asp:TextBox><br />
<asp:Label ID="Label2" runat="server" Style="position: static"
Text="Price"></asp:Label>
<asp:TextBox ID="catPriceTxt" runat="server" Style="position:
static"></asp:TextBox><br />
<asp:Label ID="Label3" runat="server" Style="position: static"
Text="Description"></asp:Label>
<asp:TextBox ID="CatDescriptionTxt" runat="server"
Style="position: static"></asp:TextBox><br />
<asp:Label ID="Label4" runat="server" Style="position: static"
Text="Image"></asp:Label>
<asp

ropDownList ID="ImageDropDown" runat="server"
DataSourceID="ImageDataSource"
DataTextField="imgName" DataValueField="imgID"
Style="position: static">
</asp

ropDownList><br />
<asp:Label ID="Label5" runat="server" Style="position: static"
Text="Vendor"></asp:Label>
<asp

ropDownList ID="VendorDropDown" runat="server"
DataSourceID="VendorDataSource"
DataTextField="venName" DataValueField="venID"
Style="position: static">
</asp

ropDownList><br />
<asp:Label ID="Label6" runat="server" Style="position: static"
Text="Category"></asp:Label>
<asp

ropDownList ID="CategoryDropDown" runat="server"
DataSourceID="CategoryDataSource"
DataTextField="SubCategory" DataValueField="subID"
Style="position: static">
</asp

ropDownList><br />
<br />
<asp:Button ID="Button1" runat="server" Style="position:
static" Text="Submit" />
</form>
</body>
</html>
--------------.VB CODE BEHIND-------------
Partial Class admin_CatalogAdd
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
CatalogDataSource.InsertParameters("catNum").DefaultValue =
catNumTxt.Text
CatalogDataSource.InsertParameters("catPrice").DefaultValue =
catPriceTxt.Text
CatalogDataSource.InsertParameters("catDescription").DefaultValue =
CatDescriptionTxt.Text
CatalogDataSource.InsertParameters("imgID").DefaultValue =
ImageDropDown.SelectedValue
CatalogDataSource.InsertParameters("venID").DefaultValue =
VendorDropDown.SelectedValue
CatalogDataSource.InsertParameters("subID").DefaultValue =
CategoryDropDown.SelectedValue
CatalogDataSource.Insert()
End Sub
End Class