Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Connect to DXL Server
Topic Summary: How do I connect to a DXL server via DXL?
Created On: 29-Aug-2008 16:09
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Tony Goodman, on Tuesday, September 2, 2008 2:38 PM

Answer:
I found this example.

Take a look at www.connectionstrings.com to see what the exact connection string should be for your database.
 29-Aug-2008 16:09
User is offline View Users Profile Print this message


Peter Hahlganss

Posts: 13
Joined: 17-Jun-2005

I need to extract some data from an SQL database. In this forum I found the following code to connect to a Access database:
"...
vCS = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\DOORS.MDB" // path !!!

oConn = oleCreateAutoObject("adodb.connection")
oRst = oleCreateAutoObject("adodb.recordset")
oFields = oleCreateAutoObject("adodb.fields")

olePut( oConn , "ConnectionString" , vCS )
oleMethod( oConn , "Open")
oleGet( oConn , "ConnectionString" , sConn )

olePut( oRst , "Source" , "Select * from Table1" ) // SQL statement
olePut( oRst , "CursorType" , 0 ) // 0 = forward cursor only
olePut( oRst , "CursorLocation" , 3 ) // client cursor
olePut( oRst , "Mode" , 1 ) // locking = readonly
olePut( oRst , "ActiveConnection" , oConn ) // set connection
oleMethod( oRst , "Open" )
..."

My question is: How do I have to change the code to connect to an SQL database. There must be information about the server, database, user id, password. How shall the connect string look like?
Does anybody have experience with this stuff?
Any suggestions, code fragments or helpful hints would be highly appreciated.

-------------------------
Peter
Report this to a Moderator Report this to a Moderator
 29-Aug-2008 16:13
User is offline View Users Profile Print this message


Peter Hahlganss

Posts: 13
Joined: 17-Jun-2005

Sorry: the topic title should have been: "Connect to SQL server"

-------------------------
Peter
Report this to a Moderator Report this to a Moderator
 1-Sep-2008 09:40
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

Answer Answer
I found this example.

Take a look at www.connectionstrings.com to see what the exact connection string should be for your database.

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 2-Sep-2008 07:41
User is offline View Users Profile Print this message


Peter Hahlganss

Posts: 13
Joined: 17-Jun-2005

Tony,

thanks for your reply. Now I got the connection to the SQL server. But I have no idea how the DXL code should look like to access the records/fields within the database. The link within your code did not help very much.
Does anybody have an example code fragment how this can be done?

Thanks
Peter

-------------------------
Peter
Report this to a Moderator Report this to a Moderator
 2-Sep-2008 10:29
User is offline View Users Profile Print this message


Tony Goodman

Posts: 97
Joined: 6-May-2008

Here is another link.

MySQL ODBC Programming

You will find examples on the internet in VB or .NET, but you will need to convert to DXL.

-------------------------
Tony Goodman
Smart DXL limited
www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 2-Sep-2008 14:39
User is offline View Users Profile Print this message


Peter Hahlganss

Posts: 13
Joined: 17-Jun-2005

Tony,

thanks a lot. I got it working now.

-------------------------
Peter
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.