Results 1 to 2 of 2

Thread: ASP AND DAO! ODBC CALL FAILED YUCKY

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110

    Angry

    Someone please help. I'm getting ODBC call fail on this program. When I do this via a normal EXE it workds, I can see the collection and see real values, however when I compile as a activex exe and run it I get the ODBC called failed message so is there something I'm missing?

    The is DSN is RA, point ot C:\RA\Customer.MDB
    no SYSTEM DB whatever that is.. no usernames or passwords are setup anywhere.

    Do I need to setup a username and password maybe since the web server is calling the EXE? Does the database have to be somewhere off the WWWROOT ?

    I'm using vb6, sp4, winpro2000 and acess2000... someone please help. I need to beat out the jerk in the other office :) thanks!



    RA.EXE(activex) in C:\RA
    --------------------
    Public oRecordsSelected As New Collection
    Public Function getDatabaseInfo() As String
    Dim WS As Workspace
    Set WS = DBEngine.CreateWorkspace( "ODBCDirect" , "Admin", "", dbUseODBC)
    Dim cn As Connection
    Set cn = WS.OpenConnection("RA", dbDriverNoPrompt, False)

    Dim rs As Recordset
    Set rs = cn.OpenRecordset("Select * from Agents", dbOpenForwardOnly)

    Do Until rs.EOF
    oRecordsSelected.Add rs.Fields("AgentUserName").Value
    rs.MoveNext
    Loop

    getDatabaseInfo = oRecordsSelected.Count
    End Function

    ASP PAGE
    ------------------------
    <%
    set RACustomer = server.createobject("RA1.RAClass1")
    RACustomer.getdatabaseinfo()
    for i = 1 to RACustomer.oRecordsSelected.Count
    respone.write "<TR><TD>" & RACustomer.oRecordsSelected(i) & "</TD></TR>"
    next
    %>


  2. #2

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    flanders, nj 07836
    Posts
    110
    oh just a correction.. the class/com is called RA/RAClass respectively.. I see I have RA1.RAClass1 in the asp.. thats' just from me trying to debug.. if you call it that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width