Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help in Coverting VB Code To VFP7
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00656562
Message ID:
00656678
Views:
18
Hello Bob:

Yes you are right about the enums, I know the value and will use #DEFINE.

Will test your code at the office tomarrow, looks like it will work. Have you worked with this software (FileNET)?

Bob, Thank You

Mohammed

>This is the best I could do, you will have to look up what I think are enums of the idmodjects.library class.
>
>
>function docget (prop as string)
>
>* ON ERROR goto errorhandler
>sy = "Not Finished"
>
>LOCAL oidmlib as idmobjects.library
>oidmlib = CREATOBJ('idmobjects.library')
>
>LOCAL oidmcn as adodb.connection
>oidmcn = CREATEOBJECT('adodb.connection')
>
>LOCAL rs as adodb.recordset
>LOCAL odoc as idmobjects.documnet
>LOCAL over as idmobject.version
>LOCAL connectionstring as string
>LOCAL x as string
>
>* This idmsystypeis may be an enum, you may have to look in the object browser
>* at this class to see what the enum value is and replace this with it, or do
>* a define above
>oidmlib.systemtype = idmsystypeis
>
>oidmlib.name = "nyshsascfh:filenet"
>
>* idmlogonoptnoui probably an enum
>oidmlib.logon("aq0340",,,idmlogonoptnoui)
>
>oidmcn.provider = "fndbprovider"
>
>* idmsystypeis probably an enum
>oidmcn.connectionstring = "data source=nyshsascfh:filenet;systemtype = " + idmsystypeis
>oidmcn.open()
>
>rs = CREATEOBJECT('adodb.recordset')
>
>rs.maxrecords = 500
>rs.activeconnection = oidmcn
>string1 = "select f_docnumber from fndocument where fairhearingnumber = '" ;
>	+ prop + "' and f_docclassname = 'fairhearingdc'"
>rs.open( string1 )
>
>DO while not rs.eof
>	holder = holder + rs("f_docnumber") + ","
>	rs.movenext()
>ENDDO
>
>IF rs.bof
>	SET rs = nothing
>	sy = "no records"
>ENDIF
>
>oidmcn.close()
>
>oidmcn = null
>oidmlib.logoff()
>oidmlib = null
>
>IF sy <> "no records"
>	sy = holder
>	docget = sy
>ENDIF
>
>RETURN
>
>
>
>BOb
>
>
>>Trying to access some documents that reside in a scanning program called
>>FileNET (Panagon). The help for developers is confusing and the API's are
>>useless
>>
>>I would appreciate any help in converting the following VB code to VFP7 code
>>********************************************
>>PUBLIC function docget (byval prop as string)
>>ON ERROR goto errorhandler
>>sy = "Not Finished"
>>dim oidmlib as new idmobjects.library
>>dim oidmcn as new adodb.connection
>>dim rs as adodb.recordset
>>dim odoc as idmobjects.documnet
>>dim over as idmobject.version
>>dim connectionstring as string
>>dim x as string
>>oidmlib.systemtype = idmsystypeis
>>oidmlib.name = "nyshsascfh:filenet"
>>oidmlib.logon "aq0340",,,idmlogonoptnoui
>>oidmcn.provider = "fndbprovider"
>>oidmcn.connectionstring = "data source=nyshsascfh:filenet;systemtype = "&
>>idmsystypeis
>>oidmcn.open
>>SET rs = new recordset
>>rs.maxrecords = 500
>>rs.activeconnection = oidmcn
>>string1 = "select f_docnumber from fndocument where fairhearingnumber = '" &
>>prop & "'" & and f_docclassname = 'fairhearingdc'"
>>rs.open string1
>>while not rs.eof
>> holder = holder & rs("f_docnumber") & ","
>> rs.movenext
>>wend
>>IF rs.bof then
>> SET rs = nothing
>> sy = "no records"
>>END if
>>oidmcn.close
>>SET oidmcn = nothing
>>oidmlib.logoff
>>SET oidmlib = nothing
>>IF sy <> "no records" then
>> sy = holder
>> docget = sy
>>END IF
>>
>>EXIT function
>>errorhandler:
>>sy = err.description
>>docget = sy
>>END function
>>*********************************************
>>seems extremely convoluted to me, (Not a VB programmer here), the above was
>>created as an "Out of Process" DLL, but the programmer who wrote this is no
>>longer with us and cannot be contacted for help. With my limited knowledge
>>of VB, I have tried to convert this to VFP 7 but to no avail.
>>
>>Would appreciate any and all suggestions and help I can get
>>
>>Thanks
>>
>>Mohammed
>>www.imaginecorp.com/whatwedo.htm
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform