AdoDB

Ranorex Spy, Recorder, and Studio.
paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

AdoDB

Post by paracelsus » Mon Mar 16, 2009 9:32 am

Hello! How can I connect to a database and write data in a table? I try to use the following code:

Code: Select all

Public Sub connectDatabase()

Set cnWorkShop = New ADODB.Connection
With cnWorkShop
	.Provider = "Microsoft.JET.OLEDB.4.0"
	.ConnectionString = "Data Source=ServerName;Initial Catalog=posta;"
	.Open
End With
But I got a lot of errors!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Mar 16, 2009 11:09 am

Please, post only Ranorex specifc questions in this forum. It's important to understand that we cannot support questions that do not relate to the Ranorex framework.

Thanks!

Regards,
Alex
Ranorex Support Team

paracelsus
Posts: 25
Joined: Thu Feb 26, 2009 3:21 pm

ranorex support

Post by paracelsus » Mon Mar 16, 2009 12:19 pm

I understand it, but I know to do this connection with QTP without problem. I dont understand that why it is wrong in the Ranorex. This is the reason, that I wrote my question in the Ranorex forum.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Mar 16, 2009 1:50 pm

I would like to help you, but you need to post the errors that occur!

Please, have a look on the following website for the right connection string to your database:
http://www.connectionstrings.com/
The "Data Source" needs to specify your server name (e.g. "serverName\instanceName") and the "Initial Catalog" is the name of your database.

Regards,
Alex
Ranorex Support Team