![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I try to program DTS using .net(C#) and my DBMS is Sybase 12, my code segment is below: when I run the app, it gives an exception "A Dll is absent." but it does not tell what dll is absent. after I copy the code segment to VB6, it runs well. why? any one can help me? using DTS; private DTS.Package2Class oPackage; private DTS.Connection oConnection; private DTS.Task oTask; private DTS.ExecuteSQLTask2 oCustomTask; oConnection = oPackage.Connections.New("MSDASQL"); oConnection.ID = 1; oConnection.DataSource = "dwdata"; oConnection.UserID = "sa"; oConnection.Password = ""; oTask = oPackage.Tasks.New("DTSExecuteSQLTask"); oCustomTask = (ExecuteSQLTask2)oTask.CustomTask; oCustomTask.Name = "truncate table Task"; oCustomTask.SQLStatement = "truncate table table1"; oCustomTask.ConnectionID = 1; oPackage.Tasks.Add(oTask); DTS.DTSTaskExecResult pTaskResult = 0; oPackage.Tasks.Item(1).Execute(oPackage, null, null, ref pTaskResult); |
![]() |
| Thread Tools | |
| Display Modes | |
| |