Help me plz: Connect to tuxedo from visual basic 6.0 client application

Hello everyone,
i have a big problem
i try to connect my visual basic application 6.0 to the tuxedo, but i dont know how to use tpinit and tpcall in vb environnement.
that my code:
Private Declare Function tpinit Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" _
(ByVal vlTpInfo As Long) As Integer
Private Declare Function TpTerm Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpterm" () As Integer
Private Declare Function TpCall Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpcall" _
(ByVal vsServiceName As String, ByVal vlBufPtr As Long, ByVal vlBufLen As Long, _
ByRef rlReplyBufPtr As Long, ByRef rlReplyBufLen As Long, ByVal vlFlags As Long) As Integer
Private Declare Function TpAlloc Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpalloc" _
(ByVal vsTpType As String, ByVal vsTpSubType As String, ByVal vlSize As Long) As Long
Private Declare Sub TpFree Lib "C:\OracleHome\tuxedo11gR1\bin\wtuxws32.dll" Alias "tpfree" (ByVal vlBufPtr As Long)
Option Explicit
Type tpinfo_type
username As String
cltname As String
passwd As String
flags As Long
datalen As Long
data As String
End Type
Dim tpinfo As tpinfo_type
tpinfo.username = "cajat05"
tpinfo.passwd = "cajat05"
tpinfo.cltname = "VB6"
tpinfo.flags = 110
tpinfo.data = "NMLRS 55502022"
tpinfo.datalen = 14
Dim ret_init As Integer
Dim ret_tpalloc As Long
ret_tpalloc = TpAlloc("tpinfo", "", 9000)
MsgBox "ret_tpalloc = " & ret_tpalloc
'ret_init = tpinit(900)
'MsgBox "ret_init = " & ret_init
Dim s As String
If ret_init = 0 Then
msgbox "good"
Else
msgbox "not good"
End If
Can any one send me the code he made for a similar case ?
Thank you in advance.
Edited by: user3465258 on 2 août 2010 14:57
Edited by: user3465258 on 2 août 2010 15:44
Edited by: user3465258 on 2 août 2010 18:00

As an alternative you may want to consider writing a "C" DLL that is callable from VB. The DLL would make the Tuxedo "tp" calls and check all the return codes and the functions defined in the DLL would simplify the interface to VB. I have done this successfully in the past.
Harvey

Similar Messages

  • How to connect to oracle database from visual basic 2010 express edition

    I have installed visual basic 2010 express edition on windows xp. But visual basic 2010 express edition supports Microsoft sql server database file,Microsoft sql server compact 3.5, Microsoft access database file. I want to connect to oracle database from visual basic 2010 express edition. So what drivers are required and how to do connectivity?

    Hello,
    I wasn't clear on what you were using to make the connection. I had a look in Visual Studio 2010 (don't have express to test sorry).
    I think you mean the Data Sources available under the menu Data-> Datasources. this seems to match the description you give when I
    look at the list of datasource options.
    In here you can make ODBC connections via the Microsoft .net Data Provider .
    If you select ODBC as a datasource you can see listed the DSN's you created - for example I see 2 which use the Oracle ODBC driver.
    This assumes you installed an Oracle Client + the oracle version of the ODBC driver (comes with the oracle client).
    Once you created a server connection then you should see it in the server explorer.
    You can also download the Oracle Developer Tools for Visual Studio which is an add on for VS.
    ** I suspect this is only for VS 2010 and I didn't see that Express was supported.
    http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index-097110.html
    Let me know if that helps.
    John

  • Can someone please help i cant connect to itunes from my iphone 4 ,,i had an iphone 3 and when i got my iphone 4 i changed my email address for new itunes account and my old phone which hubby uses

    Can someone please help i cant connect to itunes from my iphone 4 ,,i had an iphone 3 and when i got my iphone 4 i changed my email address for new itunes account and my old phone which hubby uses is changed aswell ..for some reason i cant update my apps off m iphone & in itunes via pc it will say apps are all up to date but i have 25 apps that need updating please can someone help ,, i can download a new app but i cant update existing ones ,,,
    very frustrated iphone user !!

    Changing devices is no reason to create a new Apple ID.
    All content purchased from iTunes is permanently linked to the Apple ID it was purchased with.
    To update apps purchased with the old ID, you MUST sign in with that Apple ID.

  • Unable to connect Biztalk service from Visual Studio

    I am trying connect to the BizTalk Adapter Service from My VS2012.
    I am sure connect information are correct with ACS Nnamespace/Issue name/Issue Secert
    But got some errors
    Exception Code: BadRequest
    Error:Code:400:SubCode:T0:Detail:ACS50000: There was an error issuing a token. ACS50001: Relying party with identifier 'http://xxxxxxxxx.biztalk.windows.net/default' was not found.:TraceID:fda3d29f-911c-4b63-8733-98c59ee4f685:TimeStamp:2015-04-24 15:51:23Z
    How can I do?

    Thanks Girish,
    I can connect Biztalk service from Visual Studio now.
    but I have an another issue with add SQL Target.
    How can I fix it?
    error below:
    500
    Code: '13' 
    Message: 'Error occurred while trying to bring up the relay service. Error Message: '要求的名稱正確,但找不到所要求類型的資料。
    '/twtestbs~_order_9fe15fb881964e3fafa9f79c7128daa9' 應用程式中發生伺服器錯誤。
    要求的名稱正確,但找不到所要求類型的資料。
     描述: 
    在執行目前 Web 要求的過程中發生未處理的例外狀況。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。
     例外狀況詳細資訊: 
    System.Net.Sockets.SocketException: 要求的名稱正確,但找不到所要求類型的資料。
    原始程式錯誤:
    在執行目前 Web 要求期間,產生未處理的例外狀況。如需有關例外狀況來源與位置的資訊,可以使用下列的例外狀況堆疊追蹤取得。
    堆疊追蹤:
    [SocketException (0x2afc): 要求的名稱正確,但找不到所要求類型的資料。]
     System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +8767461
     System.Net.Dns.GetHostEntry(String hostNameOrAddress) +191
     System.ServiceModel.Channels.DnsCache.Resolve(Uri uri) +535
    [EndpointNotFoundException: 主機 twtestbst0379-bts.servicebus.windows.net 沒有 DNS 項目。]
     System.ServiceModel.Channels.DnsCache.Resolve(Uri uri) +17434161
     System.ServiceModel.Channels.SocketConnectionInitiator.GetIPAddresses(Uri uri) +211
     System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout) +329
     System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout) +31
     System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout) +951
     System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout) +104
     System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +742
     Microsoft.ServiceBus.NetworkDetector.CheckTcpConnectivity(Uri baseAddress, Exception& exception) +733
    [AggregateException: 發生一或多項錯誤。]
    [CommunicationException: Unable to reach twtestbst0379-bts.servicebus.windows.net via TCP (9351, 9352) or HTTP (80, 443)]
     Microsoft.ServiceBus.NetworkDetector.DetectInternalConnectivityModeForAutoDetect(Uri uri) +648
     Microsoft.ServiceBus.ConnectivityModeHelper.GetInternalConnectivityMode(ConnectivitySettings connectivitySettings, HttpConnectivitySettings httpConnectivitySettings, Uri uri) +149
     Microsoft.ServiceBus.ConnectivityModeConnectionElement..ctor(TokenProvider tokenProvider, SocketSecurityRole socketSecurityMode, BindingContext context, NameSettings nameSettings, ConnectivitySettings connectivitySettings, HttpConnectivitySettings httpConnectivitySettings)
    +169
     Microsoft.ServiceBus.TcpRelayTransportBindingElement.BuildInnerBindingElement(BindingContext context) +647
     Microsoft.ServiceBus.TcpRelayTransportBindingElement.BuildChannelListener(BindingContext context) +40
     Microsoft.ServiceBus.HttpRelayTransportBindingElement.BuildChannelListener(BindingContext context) +429
     System.ServiceModel.Channels.Binding.BuildChannelListener(Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters) +177
     System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode,
    ServiceThrottle throttle, IChannelListener& result, Boolean supportContextSession) +393
     System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener& result) +572
     System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost) +1908
     System.ServiceModel.ServiceHostBase.InitializeRuntime() +90
     System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +182
     System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +742
     System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +126
     System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +901
    [ServiceActivationException: 編譯期間發生例外狀況,因此無法啟動服務 '/twtestbs~_order_9fe15fb881964e3fafa9f79c7128daa9/RuntimeService.svc'。例外狀況訊息: Unable to reach twtestbst0379-bts.servicebus.windows.net via TCP (9351, 9352) or HTTP (80, 443)。]
     System.Runtime.AsyncResult.End(IAsyncResult result) +650220
     System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +210733
     System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +166
    版本資訊:
     Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.17929'.'

  • Help needed in Connecting to SAP From Eclipse

    Hi All,
    Currently, we have a requirement where we need to retrieve data from SAP System and need to upload the same in a Third Party Application (Java based system).
    We are able to create an account in Java Application using Eclipse IDE by hard coding the Account details. We are stuck up in establishing the SAP connection and retrieving the details and then creating the extracted account details in Java application from Eclipse.
    Any pointers on this will be of great help.
    Regards,
    Eureka

    Hi Eureka,
    Please refrain from creating cross-posts in parallel forums, moreover this question is JCo-related and is not directly connected with Java EE 5. The Help needed in Connecting to SAP From Eclipse in the Java Programming forum would be enough. Please continue the discussion there.
    Regards,
    Vladimir

  • Type Mismatch error while calling a Java Function from Visual Basic 6.0...

    Hi,
    I'm having a problem in calling the Java Applet's Function from Visual Basic. First, I'm getting the handle of the Java Applet and components of it using "Document.Applets(n)" which is a HTML function. I'm calling this function from Visual Basic. My code is something like this...
    ' // Web1 is IE Browser in my Form.
    Dim Ap,Comp
    Dim Bol as Boolean
    Bol = true
    Ap = Web1.Document.Applets(0).getWindow() ' \\ Gets the Parent Window.
    Ap.setTitle("My Java Applet") ' \\ Sets the Title of the window.
    msgbox Ap.getVisibility() ' \\ This will return a Java boolean ( true or false )
    Ap.setVisibility(Bol) ' \\ Function Syntax is : void setVisibility(boolean b)
    Here in my code , i'm able to call any function that which accepts Integer or String but not boolean. So, i m facing problem with Ap.setVisibility() function. It gives me a "Type mismatch error" while executing it. Can you please tell me a way to do this from Visual Basic !
    I'm using Visual Basic 6.0, Windows 2000 , J2SDK 1.4.2_05.
    Please help me Friends.
    Thanks and Regards,
    Srinivas Annam.

    Hi
    I am not sure about this solution. try this
    Declare a variable as variant and store the boolean value in that variable and then use in ur method.
    Post ur reply in this forum.
    bye for now
    sat

  • How to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl

    I want to know how to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl

    You have to connect via ODBC, then use code along the lines of what is described here:
    http://scn.sap.com/thread/3526924
    by me on March 28 and Jan on March 29.
    Also see KBA: 1686419 - SAP Crystal Reports designer does not recognize Access *.accdb file
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Creating a DLL in Labview 8.6 and calling it from Visual Basic 6.0

    Dear friends,
    I need to create a DLL in Labview 8.6 and call it from Visual Basic 6.0. The system works as follows:
    I made an application using Labview 8.6 + Vision Assistant 8.6 where I can obtain the x,y coordinates of a template in an certain image being captured by an USB camera. The template coordinates change every time it moves and Visual Basic 6.0 must read these x,y values in real time. I found some information in the link http://zone.ni.com/devzone/cda/tut/p/id/3925, but it works for version 6.x of Labview and 8.6 version is different. Am I in the right path? If you have an updated tutorial like the one in the link above but for Labview 8.6 It would be very nice. Please help me.
    Kind regards.
    João Júnior

    Hello Osvaldo,
    I analysed the updated tutorial you sent me, but the thing is that it doen't show how to create the DLL in LV 8.6 but only show how to accessing the DLL from VB6. My problem is really HOW TO CREATE THE DLL IN LV8.6. In the link http://zone.ni.com/devzone/cda/tut/p/id/3063 there is detailed information about how to do this in LV6.x, the problem is that I don't find the path Tools»Build Application or Shared Library (DLL) in LV8.6, I think the procedure in LV8.6 is a little bit different. Don´t you have an updated tutorial on how to build a dll in LV8.6?How could you help me?
    Kind regards.
    João Júnior

  • How can I get the version of the GPIB driver from Visual Basic ?

    I want to readout from visual Basic which version of GPIB-Driver is installed on the PC. I must change some parameters for my application when GPIB 2.0 runs instead of 1.7.
    Thanks for any solution...

    Hi,
    The driver should create a key in registry depending on the driver version. Check for the existance of HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\NI-488.2M\ (In my case I had a folder called 2.00).
    Hope this helps out.
    Best Regards,
    Aaron K.
    Application Engineer
    National Instruments

  • Calling a dll created with vision 7.0 from visual basic doesn't work

    I created a dll using some vision 7.0 functions and Labview 7.0 environment. I call this dll from visual basic. The dll will work fine as long as I don't stop the visual basic program execution. As soon as I stop the program execution the dll will no longer work. I must reload the visual basic environment and the call to the dll will start working again. I created the exact same dll but I created it with vision 6.0 in Labview 6i environment. It works great and has no issues.
    Attachments:
    Test.vi ‏36 KB

    Roberto N. wrote:
    Thank you Jordan, I'm using Labview 7.1.
    Anyway I've resolved the problem by adding the "lvanlys.dll" file (present in "..\Labview 7.1\resource\lvanlys.dll" path) as support file in the building process. Now the DLL containing the analysis functions works correctly.
    Natalino Roberto
    Ok, you probably got lucky since the lvanlys.dll seems to implement that function directly. However most Advanced Analysis functions are just redirected by lvanlys.dll to the Intel Math Kerneal Library that gets installed with LabVIEW 7.1 and higher. The only way to get that properly installed with your LabVIEW executable or DLL is to create a LabVIEW installer in your Application Builder and make sure to select under "Installer Settings->Advanced" the "LabVIEW Run-Time Engine" and the "Analyze VIs Support". Then use that installer to install your DLL on another computer.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Inserting into Oracle9i  DB from Visual Basic

    Hi,
    I have a Visual Basic 6.0 application that queries an Oracle database to insert into a table. In some cases it will insert fine and in others it won't. Am I doing something wrong in the way I query the Oracle database? I don't get any errors, it just doesn't insert the data. Here's my code that does not work:
    QueryString = "insert into neworcldb10.SpectraDataItem (SpectraDataItemID,SpectraDBID,BandNumber,SpectraData) values " + "(" + CStr(OID.OID) + ", " + CStr(ParentSpectraOID.OID) + ", " + CStr(Band) + ", " + CStr(data) + " );"
    DBHandle.Execute querystring, , adCmdText + adExecuteNoRecords
    I've copied and pasted the query statement into sqlplus and it works fine there. I thought that it may be my connection, but the program inserts fine in other functions. Any help would be appreciated.
    Thanks,
    Malina

    Suppose that you have something like this:
    Dim my_conn_obj as ADODB.Connection
    my_conn_obj.execute( "insert into neworcldb10.SpectraDataItem (SpectraDataItemID,SpectraDBID,BandNumber,SpectraData) values " + "(" + CStr(OID.OID) + ", " + CStr(ParentSpectraOID.OID) + ", " + CStr(Band) + ", " + CStr(data) + " );" )
    Try to do that and post the results!
    Joel Pérez

  • ActiveMovie Control,Translating ActiveX calls from Visual Basic into Labview

    Hello,
    I want to use DirectX to display a movie. In the attached file is a Visual Basic example
    which I tried to translate into Labview.
    To play the movie IMediaControl from ActiveMovie control type library Version 1.0 C:\WINDOWS\system32\Quartz.dll) is used.
    To display the current Position I tried to wire the IMediaPostion. But I have no idea how to implement this in the Block Diagram.
    After opening it the following message is shown.
    Error 3005 occurred at Automation Open: Object specified is not creatable in Play Movie Current Possition.vi
    Attachments:
    Play_Movie_Current_Possition.vi ‏48 KB

    Hello Joe,
    the Windows Media Player has a lot of overhead. I also found it difficult to deal with the different Versions.
    I want to display data in a graph and show the connected video frame in a separate window.
    I used the QuartzTypeLib because it is on every Windows Computer and is easy to code in VB.
    With one call I can start the video in Labview., but I find no way to wire the current position. I do not really understand how ActiveX is implemented in Labview. I attached a LV 7.0 vi. I hope you can open it.
    Tiemo
    Attachments:
    Play_Movie_Current_Position.vi ‏63 KB

  • Can not select the VISA library (visa32.dl​l) as a reference from Visual Basic.

    I have a copy of Labview base package version 5.1.1 and Microsoft Visual Basic 6.0 in my PII 333 128M PC. I like to use the NI-VISA feature to develope my own testing program by using Visual Basic. However, the NI-VISA library (i.e. visa32.dll) can not be found from the Visual Basic reference library.

    Go PROJECT | REFERENCES menu. In the list, look for "VISA library".
    If the list does not show it, then BROWSE the visa32.dll located in the
    WinNT\SYSTEM32 folder.
    If the VISA library is earlier than V2.x, there is no TypeLib supported.
    Makoto
    "rfan99" wrote in message
    news:506500000008000000B6180000-984882144000@quiq.​com...
    > I have a copy of Labview base package version 5.1.1 and Microsoft
    > Visual Basic 6.0 in my PII 333 128M PC. I like to use the NI-VISA
    > feature to develope my own testing program by using Visual Basic.
    > However, the NI-VISA library (i.e. visa32.dll) can not be found from
    > the Visual Basic reference library.

  • How to set transceiver mode to 2-wire TXRDY Auto from Visual Basic

    I am using a PCMCIA-485 adapter to interface to some RS-485 sensors. The sensors are connected using a 2-wire interface. I have developed an application in Visual Basic to control the various sensors. However, the application is dependent on the PCMCIA-485 adapter's transceiver mode being configured into the "2-Wire TXRDY Auto" mode. Presently I require the user to configure the transceiver mode by opening up the advanced setting dialog within the device driver for the adapter and manually setting the transceiver mode. I would prefer to have my application take care of this directly. Unfortunately, I cannot find any references that document how to do this.
    Can I use Measurement Studio Tools for
    Visual Basic to control the transceiver mode of the PCMCIA-485 adapter?

    Hello-
    There is a registry key in Windows that can change this mode:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Serial\Parameters\Serial1000X\TransceiverMode
    Try experimenting with it by hand first. It may also be necessary to reboot after changing this value.
    Randy Solomonson
    Application Engineer
    National Instruments

  • Oracle DLL Error using AQ (in Oracle 10g) from Visual Basic

    Hi, everybody
    I have a Visual Basic 6 (with SP 6) application which connect to Oracle through an ODBC connection. Not only the client but also the server use Oracle 10.2.0.3.
    The application accesses to Oracle Queues by using OraAQ, OraDatabase, OraSession... objects.
    Everything works all right until the moment of closing the application; when the OraAQ object is disposed, an error in a DLL occurs. The DLL is orageneric10.dll, and it causes a Windows error which closes the application. Windows XP is used as operating system.
    The error only happens with the OraAQ object; other objects are disposed without any problem.
    Please, if somebody have an explanation, let me know. It is a very important issue for us.
    Thanks in advance

    Has anyone discovered an answer to this yet? I get the same issue, but am struggling to find a solution anywhere.
    (VB.NET on Visual Studio 2005, Flash CS5, Flash Player 10.1.85.3, AS3)

Maybe you are looking for