Hi there and thanx for reading my post
I'm a bit confused here, after trying all known possibilities to make this work, but yet.. nono.. no success
Either way i put it i get either
1) "Missing Default property" cause it seems i need totSak(0) and not totSak.
2) Type Mismatch or Type Mismatch '[string ""]'
Where should i use :
1) cStr ?
2) totSak(0) VS totSak ?
Therefore i humbly ask someone for help, to see if someone can see what's wrong with this :
Any code completion of this mess would be perfect !
---------------INFO-----------------
ASP -> MS SQL database
saksomr is a int (field in table)
saksomrade is a string (field in table)
-------------------------------------
--------------SQL QUERY---------------
//before this comes the connection and everything.. and that works perfect//
Dim objRS
objCommand.CommandText = "SELECT enavn,fnavn,prof,arbsted,adr,postnr,poststed,tlfnr ,mobnr,epost,passiv,saksomr,fagkomp,funksjoner,ste d,fylke,pd,kontaktpers,fritekst from KONTAKT"
set objRs = objCommand.Execute
----------------------------------------
-----------THE COMPARSION-------------
Dim totSak, tmpSak
totSak = "0"
tmpSak = "0"
if cStr(objRs("saksomr")) = "1" then
objCommand.CommandText = "SELECT saksomrade FROM SAKSOMR WHERE SID = 1"
set tmpSak=objCommand.Execute
if cStr(totsak) = "0" then
totSak = tmpSak
else
totSak = totSak & "<br>" & tmpSak
end if
end if
// PS ! There are 4 IF checks like this for the 4 different saksomr.
// if there's more than one saksomr on one post, it just uses tmpSak to add
// to Totsak with a <br> between...
---------------------------------------------
-------------PRINTING OUT-------------------
<td class="litentekst_gra"><% Response.Write(totSak) %></td>
----------------------------------------------