1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

recordset issues

Discussion in 'C#' started by red_fiesta, Dec 5, 2006.

  1. #1
    I have been making some work locally and am having some issues when uploaded some of the site

    In my site i have used alot of recordsets

    and have used them within each other, for example

    <%Dim rsInfo, sqlInfo 
    Set rsInfo = Server.CreateObject("ADODB.Recordset")
    sqlInfo = ("select * from Group1")
    rsInfo.Open sqlInfo, DBconnect
    %>
    
    
    				
    			
    <%
    Dim rsGroupNew, sqlGroupNew, imageCount
    
    imageCount = 1
    
    while not rsInfo.eof 
    %>
    	
    	
    	retuned info
    				
    				
    				<%
    
    Set rsGroupNew = Server.CreateObject("ADODB.Recordset")
    sqlGroupNew = ("select * from group tg, sec ts where tg.g_ID=ts.g_ID and ts.g_ID=") & rsInfo("g_ID")
    
    rsGroupNew.Open sqlGroupNew, DBconnect
    %>
    
    returned info				
    	
    		
    		<%
    		rsGroupNew.movenext
    	wend 
    	
    	rsGroupNew.close
    	set rsGroupNew=nothing
    
    rsInfo.moveNext
    wend
    
    rsInfo.close%>
    Code (markup):
    ok i have stripped out some code but shows the idea of opening a recordset and getting a value and while that is in loop using that value in another recordset

    this works on my machine but when i put in on the hosting and set the db rights to be write which i need it fails saying

    Microsoft JET Database Engine error '80004005'

    Could not use ''; file already in use

    and gives the line of where the second recordset is opened?

    anyone any ideas?

    Thanks
     
    red_fiesta, Dec 5, 2006 IP
  2. Talker

    Talker Notable Member

    Messages:
    2,795
    Likes Received:
    108
    Best Answers:
    0
    Trophy Points:
    210
    #2
    Hi Red Fiesta,

    This is a bit of an odd error that I have never received myself but have been asked about on number of occasions. It usually means that either incorrect permissions are set on the server or the incorrect version of MDAC (Microsoft Data Access Components installed on the server or the version is not correctly installed). You need to ensure the ODBC version you have is 4 or greater.

    If you are running the web server yourself then read this
    http://www.webwizguide.info/asp/faq/server_permissions.asp


    If you are not running the server yourself you will need to contact your web space provider and ask them how to sort the problem out.

    Regards
    Talker
     
    Talker, Dec 5, 2006 IP