|
Peter, I'm glad to see others on this list working with VB and DataQs. I have numerous project using the techniques you are currently coding. But I wonder, did you look around for ActiveX objects to fulfill your needs or are you like the rest of us and have to code this stuff yourself before you can trust it? I spent a year and a half coding with the CA/400 API and I didn't use them all either. I did though, devote my entire efforts to creating an ActiveX set of objects to reuse over and over again. This has turned the CA/400 interface using VB into a truly RAD environment to work in. Less coding and debugging has been a HUGE payoff. This should help you get the cwbCO GetDefaultSysName function integrated into your VB project: Const CWB_OK = 0 Declare Function cwbSV_CreateErrHandle Lib "cwbSV" ( _ ErrorHandle As Long) As Long Declare Function cwbCO_GetDefaultSysName Lib "cwbCO" ( _ DefaultSystemName As Byte, _ ByVal BufferSize As Long, _ Needed As Long, _ ByVal ErrorHandle As Long) As Long Private Function DefaultSystemName() As String Dim bSystemName() As Byte Dim lBufferSize As Long Dim lNeeded As Long Dim sTmp As String Dim lErrorHandle As Long Dim lRC As Long Call cwbSV_CreateErrHandle(lErrorHandle) lBufferSize = 256 Do ReDim bSystemName(lBufferSize) As Byte lRC = cwbCO_GetDefaultSysName(bSystemName(LBound(bSystemName)), lBufferSize, lNeeded, lErrorHandle) If lRC = CWB_OK Then If lBufferSize = lNeeded Then Exit Do lBufferSize = lNeeded End If Loop While lRC = CWB_OK Call cwbSV_DeleteErrHandle(lErrorHandle) If lRC = CWB_OK Then sTmp = "" For lNeeded = LBound(bSystemName) To UBound(bSystemName) If bSystemName(lNeeded) = 0 Then Exit For sTmp = sTmp & Chr$(bSystemName(lNeeded)) Next lNeeded DefaultSystemName = sTmp Else DefaultSystemName = "" End If End Function Ken Slaugh (707) 795-1512 x118 Chouinard & Myhre, Inc. AS/400 Professional Administrator/MSE Client Access Specialist http://www.cm-inc.com/ "Peter Dow" <pcdow@yahoo.com> To: <MIDRANGE-L@midrange.com> Sent by: cc: owner-midrange-l@mi Subject: Client Access environments drange.com 09/07/00 06:56 PM Please respond to MIDRANGE-L Hi All, I finally got a VB 6.0 program to successfully read and write to a data queue on an AS/400. In order to do this, I switched from Client Access to CA Express. When I had CA installed, I had a Primary Environment, and a DSS environment. When I installed CA Express, these are now managed by Ops Nav. I see the DSS environment, but no Primary Environment, just "My AS/400 Connections". The VB program, through no fault of my own, uses the DSS environment. When I cloned the program and try to make it into CGI, it uses the non-existent "Primary Environment", which btw had no systems in it. Questions: 1) is there any way to have the VB program select the CA environment? 2) if the answer to 1) is no, how do I create the "Primary Environment" it's using? I've already tried creating one and adding a system to it, but it doesn't show up in the SystemNames object. I also tried renaming the "DSS" environment to "Primary Environment" after which it promptly lost 6 of the 9 systems I had defined. TIA, Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +--- +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.