Hi
Can someone help me. Here is my script (some of it)
<script language="vbscript" runat="server">
dim itemtxt
sub gendata(bid)
set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.ConnectionString = "driver={SQL Server};XXXXXXXXXXXXX;uid=XXXXXXX;pwd=XXXXX;database=softinn_reg"
OBJdbConnection.Open
set RsCustomerList = Server.CreateObject("ADODB.Recordset")
RsCustomerList.ActiveConnection = OBJdbConnection
RsCustomerList.CursorType = adOpenKeyset
RsCustomerList.LockType = 3
RsCustomerList.source = "select ItemDesc from eCatalog where Catalognr='" & bid & "' and USID='bcQ4-Az9k'"
RsCustomerList.open
itemtxt = RsCustomerList("ItemDesc")
RsCustomerList.close
end sub
</script>
<script language="javascript">
function lookupbid(bid){
<%dim bid
bid = %> + bid
<%gendata(bid)%>
return('<%= itemtxt %>');
}
</script>
The probelm is that the java-variabel bid (in red) is empty when the page are loading. Can I do this in a different way?
regards
Rune
Can someone help me. Here is my script (some of it)
<script language="vbscript" runat="server">
dim itemtxt
sub gendata(bid)
set OBJdbConnection = Server.CreateObject("ADODB.Connection")
OBJdbConnection.ConnectionString = "driver={SQL Server};XXXXXXXXXXXXX;uid=XXXXXXX;pwd=XXXXX;database=softinn_reg"
OBJdbConnection.Open
set RsCustomerList = Server.CreateObject("ADODB.Recordset")
RsCustomerList.ActiveConnection = OBJdbConnection
RsCustomerList.CursorType = adOpenKeyset
RsCustomerList.LockType = 3
RsCustomerList.source = "select ItemDesc from eCatalog where Catalognr='" & bid & "' and USID='bcQ4-Az9k'"
RsCustomerList.open
itemtxt = RsCustomerList("ItemDesc")
RsCustomerList.close
end sub
</script>
<script language="javascript">
function lookupbid(bid){
<%dim bid
bid = %> + bid
<%gendata(bid)%>
return('<%= itemtxt %>');
}
</script>
The probelm is that the java-variabel bid (in red) is empty when the page are loading. Can I do this in a different way?
regards
Rune