I am not sure exactly what do you want to accomplish. But in addition to the sockets programming, perhaps these are something you can consider:
1. Access AS/400 data from vb, simply use odbc or oledb in the vb.
2. Access from rpg program to SQL server, etc., then setup the remote host and...
1. for vb to access db2/400, I use the code like this:
...
Dim cnDataSource As ADODB.Connection
Dim rsData As ADODB.Recordset
Dim stConnect As String
Dim stSQL As String
stSQL = "select * from lib.file"
' create the connection string
stConnect = "Provider=IBMDA400;"...
Also, goto Tools->Macro->Security. Click "Trusted Sources" tab and make sure the "Trust access to Visual Baisc Project" option is checked.
-Jerry
SELECT adarnb, adagtx,adahcd, adaicd, avclas,
avhscd, avevla, avevbl, avevob
FROM Library.aparl7
JOIN Library.aavlul1
ON adarnb = avbonb
AND adaynb = avskey
WHERE adarnb = 2003
** check your as/400 ODBC drive setup. usually the / after the library in native mode...
select ProjectInfo.projID, max(contact)
from ProjectInfo left join ProjectContacts
on ProjectInfo.projID = ProjectContacts.projID
group by ProjectInfo.projID
I'll create a view for each table using the count(*) >1 to filter out the unduplicated rows. Then 'UNION ALL' all these 17 views again using the count(*) >1 to get the final result.
try this:
select a.CustID,
max(b.CallDate) as previousCallDate,
a.CallDate as nextCallDate,
datediff(day, max(b.CallDate), a.CallDate) as daysSince
from CallTable a
join CallTable b on a.CustID = b.CustID and a.CallDate > b.CallDate
group by a.CustID, a.CallDate
how about using escape code like this:
SELECT dbo_v_AlarmEventHistory.Area,
dbo_v_AlarmEventHistory.Description
FROM dbo_v_AlarmEventHistory
WHERE dbo_v_AlarmEventHistory.Description Like '*P202*' AND dbo_v_AlarmEventHistory.Area Not Like '[$]*'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.