Book a Demo

Author Topic: DBType property in connection string  (Read 4366 times)

Sue Maurizio

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
DBType property in connection string
« on: February 25, 2010, 10:56:19 pm »
Hello,
I'm developing a C# application that, among other things, builds a connection string using the MSDASC.DataLinks class. What I'm getting now is a connection string which is very similar to the ones used by EA, but I'm still missing a part. What I'm trying to get is something similar to this string:

cecere --- DBType=0;Connect=Provider=MSDASQL.1;Persist Security Info=False;Data Source=Cecere

while right now I'm getting this one:

Provider=MSDASQL.1;Persist Security Info=False;Data Source=Cecere

So I'm currently missing the first part. As for the name of the connection (in this case, "cecere"), I guess I should simply ask the user to provide one, but I don't know how to set the value of "DBType". Can you help me?
Thanks
S.M.
http://www.soluta.net

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: DBType property in connection string
« Reply #1 on: February 25, 2010, 11:45:10 pm »
Sue,

Are you trying to build a connectionstring to connecto to EA? (I didn't read that explicitly in your post)
If that is the case, I would try to figure out how the dbtype changes. You can inspect the connectionstring if you do a "save as" of a model to a eap "hyperlink" file.

I think it represents the different database types as identified by EA.
We use SQL server and here the DBType is always "1".
I've seen (in the help file) that Oracle seems to be "3".

Geert

Sue Maurizio

  • EA Novice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: DBType property in connection string
« Reply #2 on: February 27, 2010, 01:45:22 am »
Well, that's simple enough :D I don't know why I didn't think about it in the first place... Thanks!