|
[EDI-L Mailing List Archive Home]
[Message List]
[Reply To This Message]
RE: 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]
|
|
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|