Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: Failed to open connection Post Reply Post New Topic
Author Message
Cheri Reed
Newbie
Newbie


Joined: 12 Mar 2009
Location: United States
Online Status: Offline
Posts: 1
Quote Cheri Reed Replybullet Topic: Failed to open connection
    Posted: 12 Mar 2009 at 10:56am
I have a Windows Service written in VB.net that will load a report and email it to a user.  I am using CR XI, SQL 2005.  This has worked previously but all of a sudden, no longer works. 
 
On a Vista machine the windows service just stops with no errors.  On an XP machine, I get "failed to open database connection, database vendor code: 17".  It is running in a domain environment (nor sure if this matters) using SQL Windows Authentication.
 
Interstingly enough, the same code runs (and works) in a Windows Forms application.
 
here is a code snippet:
 

Dim rd As New ReportDocument

rd.Load(ReportName)

For x As Integer = 0 To rd.DataSourceConnections.Count - 1

If (rd.DataSourceConnections(x).DatabaseName = "AssetTracker") Then

rd.DataSourceConnections(x).SetConnection(gstrBackEnd, "AssetTracker", True)

End If

Next

Any help is appreciated!


Edited by Cheri Reed - 12 Mar 2009 at 10:58am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.