Vb.net Oracle error:Ora-00162 external dbid 17 is greater then max(16)

We are having a problem I am getting the above error when I try to connect to an oracle database.  I have no idea why this is happening. The connection works fine on my machine but when I build a setup project and install on another machine I get the error above.  Am I missing a step when I created the setup project?  My oracledatareader below works fine in debug mode, but not when install it.  I tried everything I can think of.  Any ideas?

Imports System.Data.OracleClient

  Dim oracleconn As OracleConnection = New OracleConnection("Data Source=xxxxxx.xxxxxx.xxx; User ID=xxxxxxxxx; Password=xxxxxxxx;") ' production database

  Function runtotal(ByVal sval As String, ByVal lhold As Label)
        Dim dr As OracleDataReader
        Dim cmd As OracleCommand
        SyncLock oracleconn
                cmd = New OracleCommand(sval, oracleconn)
                dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
                While dr.Read
                    lhold.Text = dr.GetInt32(0)
                End While
            Catch ex As Exception
            End Try
        End SyncLock
    End Function
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ORA-00162: external dbid length string is greater than maximum (string)
Cause: An external database name with too large a length field was passed in.
Action: Report the problem to your external transaction coordinator vendor.

Another person with the problem: http://www.dotnet247.com/247reference/msgs/33/166477.aspx

So it's an oracle problem caused by you databasename or tablename which is too long. In your case it's 17 characters long, while only 16 characters are allowed to be used.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tentavariousAuthor Commented:
Ok, but why does it work fine in my debug application and also it works with sql plus.  The only time it doesnt work is when i create the setup project and install the application on another computer.
Are you connecting to the same database and are debug and release build settings the same?
tentavariousAuthor Commented:
Yes on the first one, and I am not sure on the second one.  Alls I do to release is change debug to release then build the project.  What settings if any would i have to set manually?
None, that's why I am asking :). Try writing some parameters (database name, connection string, etc) and data into a txt file during both release and debug build and look if there are any differences. You could also write it to the event log.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.