[EDI-L Mailing List Archive Home] [Message List] [Reply To This Message]

RE: exteranl DB access thru Gentran Extended Rule

From: "Chris Vanderwielen" <chris.vanderwielen@...>
Date: Fri Sep 5, 2003  3:13 pm
Subject: RE: [EDI-L] exteranl DB access thru Gentran Extended Rule
What I ended up doing was writing a .dll and registering it on the
server GENTRAN is running from.

>>>>>Code Snippet VB6<<<<<<

Option Explicit
Private objConnection As ADODB.Connection, objRecordset As
ADODB.Recordset

Public Sub OpenDB(ByVal intIndex As Integer)
Set objConnection = New ADODB.Connection

Select Case (intIndex)
Case 1
objConnection.ConnectionString = "Driver={SQL
Server};Server=########;Database=########;UID=#########;Pwd=#########"
Case 2
objConnection.ConnectionString = "Driver={SQL
Server};Server=#########;Database=#######;UID=##########;Pwd=#########;"
End Select

objConnection.CursorLocation = adUseClient
objConnection.ConnectionTimeout = 120
objConnection.Open
End Sub

'''''''''''''''''''''''''''''''''''''''''''
(the select is so I can point to a dev database if I need to test things
first)

In the Session Rules for the mapping, I added:

OBJECT db;

db = CREATEOBJECT("dbAccess.GENTRAN");
db.OpenDB(2);


Then, in the Extended Rule:

'This grabs the default unit of measure for the given item from out ERP
system'

STRING[2] unit;
unit = db.GetItemUnit(#tdsls041_item:2:5);
#tdsls041_cuqs:5 = unit;
#tdsls041_cups:5 = unit;


Hope this helps.

Chris


-----Original Message-----
From: shaji raj [mailto: Sent: Thursday, September 04, 2003 11:14 PM
To: Anderson, Jack (CAG-CC); Subject: [EDI-L] exteranl DB access thru Gentran Extended Rule

Hi group

I required some urgent help. I m looking for some solution to access an
external database of SQL server using Gentran Extended Rule. Can anybody
help me. Please it very very urgent

Shaji



[Non-text portions of this message have been removed]




 
EDI to XML Mapping for EDIFACT/X12 Convert EDIFACT/X12 Schemas to XML Schema Legacy Data Conversion Tools Access Relational Data as XML Visual XSLT and XQuery Mapping Tools Simplify EDI Data Integration with Stylus Studio XML Enterprise Suite - Free Download!
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.