Jump to content
Sign in to follow this  

server 2003 help

Recommended Posts


i have a script that reads from and writes to an access database. All of the files are located on a server 2003 server. It works fantastically in XP, but i wanted to be able to run it from the server via remote desktop.

The script is not failing or giving me any errors, but its also not pulling the info or populating the lists (not sure where its failing)

code to fill lists and get fields for later input:

;~ fill lists
$query = "SELECT * FROM " & $tares
global $tareoutput=_listdata($query, $db, $taredesc, $tareW)

for $i=1 to $tareoutput[0][0]
    $strData = $strData & "|" & $tareoutput[$i][0]

for $i=1 to 21

global $fields = _FieldNames($db, $wastetable)


func _listdata($_sql, $_dbname, $_field, $_field2)
$adoCon = ObjCreate ("ADODB.Connection")
    $adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $_dbname)
    $adoRs = ObjCreate ("ADODB.Recordset")
    $adoRs.CursorType = 1
    $adoRs.LockType = 3
    $adoRs.Open ($_sql, $adoCon)
    Global $_output[$_count+1][2]
    With $adoRs
        If .RecordCount Then
            While Not .EOF
                $_output[$r][0]= .Fields ($_field).Value
                $_output[$r][1]= .Fields ($_field2).Value
    return $_output

Func _FieldNames($dbname, $tblname)
    $adoCon = ObjCreate ("ADODB.Connection")
    $adoCon.Open ("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & $dbname)
    $adoRs = ObjCreate ("ADODB.Recordset")
    $adoRs.Open ("SELECT * FROM " & $tblname, $adoCon)
    dim $name[$adoRs.Fields.Count-1]
    For $i = 1 To $adoRs.Fields.Count-2
        $name[$i] = $adoRs.Fields ($i +1).Name
    Return $name
EndFunc ;==>_FieldNames

Ive tried searching the forms and have not been able to come up with anything definative. Thanks for any suggestions you can give.

Share this post

Link to post
Share on other sites

maybe adding some debug information (msgboxes along that way) to see where the two programs start to have descrepencies form eachotehr when ran of differrent servers.

I also saw this on a wuick google search but maybe it's just some junk-


seems to say there's a problem with ADODB in 2003? I doubt it but worth a mention. I'd try some debugging first on your end.

Share this post

Link to post
Share on other sites

i tracked it down some more and everything works just fine up until

for $i=1 to 21

for some reason it is not populating any of my lists. I tried


and it still did not work. Anybody else have a problem with ctrlsetdata? Is there another way to do this?


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this