Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delete DUOS object /"Invalid connection string attribute"

Status
Not open for further replies.

SpeedyGonza

Technical User
Nov 16, 2004
18
CA
I have added a custom text field using VBA and Modifier and store it as a DUOS object. It uses a combinedID like this:
ObjectID = VBADynamics.DUOSObjectCombineID(ItemTransactionEntry.Number, ItemTransactionEntryDetail.LineSEQNumber)

Now when I click delete on the main window it will be able to find the ItemTransactionEntry.Number but it doesn't know anything about the LineSEQNumber. Is there something like a wildcard character that I can use and tell the program to delete anything that contains the first part of the combinedID?

If I cannot do this programmatically in VB...can anyone offer some help in how to invoke a stored MSSQL procedure to do this?

I have installed RetrieveGlobals.dll and ado add-on for GP. I couldn't get my connection string working:
cn.ConnectionString = "Provider=SQLOLEDB;Driver={SQL Server};Server=MyServerName;Database=MyDatabase;Trusted_Connection=yes;"
cn.CursorLocation = adUseNone
cn.Open
cmd.ActiveConnection = cn
cmd.CommandType = adCmdText

But I get an error saying "Invalid connection string attribute"

Thank you very much.
 
Here is the connection string for use with RetrieveGlobals. I think your problem is the Trusted Connection part as GP does not support Trusted Connections.

Dim cn As New ADODB.Connection
Dim userinfo As New RetrieveGlobals.retrieveuserinfo
Dim lintercompanyid As String
Dim luserid As String
Dim lsqlpassword As String
Dim lsqldatasourcename As String
Dim constring As String

' RetrieveGlobals
lsqldatasourcename = userinfo.sql_datasourcename()
luserid = userinfo.retrieve_user()
lsqlpassword = userinfo.sql_password()
lintercompanyid = userinfo.intercompany_id()

constring = "Provider=MSDASQL" & _
";Data Source=" & lsqldatasourcename & _
";User ID=" & luserid & _
";Password=" & lsqlpassword & _
";Initial Catalog=" & lintercompanyid
' MsgBox constring

With cn
.ConnectionString = constring
.CursorLocation = adUseNone
.Open
End With


David Musgrave [MSFT]
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top