Underlying provider failed to open
Hi all,
I published my web site to windows azure cloud service and successfully opened.
But my problem after about 8 hours without any request to my site I got an exception (The Underlying provider failed to open)
Thanks,
Khalil
Hi,
From my experience, this error may be caused by incorrect connection string, I suggest you check it, then try to redeploy to cloud service again.
In addition, Azure service dashboard report a service interrupt on SQL Azure, please try later when this service run as normal. see at:
http://azure.microsoft.com/en-us/support/service-dashboard/
Best Regards
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.
Similar Messages
-
Intermittent connection issues: The underlying provider failed on Open
We are experiencing this error from Azure Compute to SQL Azure intermittently over the last couple of days (SE Asia).
We have several applications in the same configurations and many of them exhibit this error for a period of time (some around 15 minutes).
I checked the Azure status board and there is one warning about Networking but it is informational only. The Azure portal shows 0 failed connections on the database monitor and the connection numbers aren't massive (highest is 240).
Is there another issue going on that's not on the status board (or is that networking issue worse than specified)?
The application hasn't experienced this issue until the last couple of days so we don't believe it's a bug.
Details:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)Hello,
SQL Database connection can fail for various reasons – a malformed query, network issues, and so on. Some errors are transient or intermittent. The general best practices to prevent connection-losses is to re-establish the connection and then re-execute
the failed commands or the query. For example, You can try to apply retry logic for SQL Server in your application.
Reference:
Retry Logic for Transient Failures in Windows Azure SQL Database
Windows Azure SQL Database Connection Management
Regards,
Fanny Liu
If you have any feedback on our support, please click here.
Fanny Liu
TechNet Community Support -
Getting Error: The underlying provider failed on Open
Hi there,
I am getting above error while executing below code, though it is working fine on another machine. please help me out
log.ActionId = (from x in context.ActionLookUps
where x.ActionDescription == actionMessage
select x).First().ActionId;
context.UserLogs.Add(log);Hi,
This exception gets thrown when something goes wrong connecting to the database. The inner exception should have details about why the connection failed if you check that then it should tell you what is happening.
Since this is working on other machines it is likely something to do with the permissions of the user executing the code or something to do with that specific machine communicating with the database.
If you let us know what the inner exception is then we can probably provide more info.
We are seeing a lot of great Entity Framework questions (and answers) from the community on Stack Overflow. As a result, our team is going to spend more time reading and answering questions posted on Stack Overflow. We would encourage you to post questions
on Stack Overflow using the entity-framework tag. We will also continue to monitor the Entity Framework forum. -
The underlying provider failed on open
Hi all,
I use the following Save method for the context so that I first insert the entities so that I have their identity column, then save the audit log for them.
public int Save()
int recordsUpdated = 0;
List<History> historyList = new List<History>();
this.DetectChanges();
IEnumerable<ObjectStateEntry> list = this.ObjectStateManager.GetObjectStateEntries(EntityState.Added | EntityState.Deleted | EntityState.Modified);
foreach (var ent in list)
if (!ent.IsRelationship && ent.Entity != null && !(ent.Entity is History))
historyList.Add(new History(ent));
DbConnection conn = ((EntityConnection)this.Connection).StoreConnection;
ConnectionState initialState = conn.State;
try
//Open connection if not already open
if (initialState != ConnectionState.Open)
conn.Open();
using (var scope = new TransactionScope())
recordsUpdated = this.SaveChanges();
if (historyList.Count > 0)
foreach (var history in historyList)
history.SetDetails();
this.Histories.AddObject(history);
this.SaveChanges();
catch (Exception ex)
System.Diagnostics.Debug.WriteLine(ex);
finally
//Only close connection if not initially open
if (initialState != ConnectionState.Open)
conn.Close();
return recordsUpdated;
The first thing to notice is that the connection is closed that's why I'm opening it.
First problem:
When updating an existing record and I reach the second call to SaveChanges, I get the above exception.
Second problem:
When inserting an new record I get the following exception:
"An error occurred while updating the entries. See the inner exception for details."}
[System.Data.UpdateException]: {"An error occurred while updating the entries. See the inner exception for details."}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
HResult: -2146233087
InnerException: {"The member with identity '' does not exist in the metadata collection.\r\nParameter name: identity"}
Message: "An error occurred while updating the entries. See the inner exception for details."
Source: "System.Data.Entity"
StackTrace: " at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)\r\n at System.Data.EntityClient.EntityAdapter.Update(IEntityStateManager entityCache)\r\n
at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)\r\n at System.Data.Objects.ObjectContext.SaveChanges()\r\n at AboServer.AboSystem5DB.Save() in C:\\Development\\dotNET\\ABOSystem5\\Server\\Common\\AboSystem5DB.cs:line
136"
TargetSite: {Int32 Update(System.Data.IEntityStateManager, System.Data.IEntityAdapter)}
Need help!!Couple of things:
1) When using Entity Framework, you do not need to explicitly open the connection. This statement should do it for you. Not only does it open the connection it also closes it when going out of scope of the USING verb.
using (var scope = new TransactionScope())
2) This part of the stack trace---> System.Data.Mapping.Update.Internal.UpdateTranslator.Update
Tells me that something is wrong with Mapping. I personally do not manually attempt to map anything when using EF because it appeared to be complex and required a lot of study of which I didn't have the time. So...I always
allow EF to create the tables and mappings and it works everytime.
I'd suggest removing the explicit open code and fall back to the Using statement only. I'd also suggest recreating your table model using EF's wizard which forces you to do the connection string and then to pick the proper tables. It knows how
to map everything and does a great job of it.
JP Cowboy Coders Unite! -
The underlying provider failed on Commit.
Hello,
I am having a problem with commit.
Here is the code where program stuck.
using (var transaction = DataEngine.Context.Database.BeginTransaction(IsolationLevel.ReadCommitted))
try
var createResult = DataEngine.Context.Customer_Modify(BusinessID, cutomerName,usermodified);
Logger.LogTrace(createResult.ToString());
await DataEngine.Context.SaveChangesAsync();
transaction.Commit();
catch (Exception ex)
Logger.LogTrace(ex.Message);
// Attempt a rollback
try
transaction.Rollback();
catch (Exception nex)
Logger.LogTrace(nex.Message);
throw;
throw;
After running the above code, I check the variable query and found an exception
The underlying provider failed on Open.
I've checked:
Connection between server and computer is normal
I can login to the database with username and password
I have checked the security settings in database (SQL Server) that permission has been granted .
I can able to 'Insert' records but not 'Update'
Why does this exception happen? I'm using .net 4.5
ThanksHi SamKri,
You could try to enabling "Allow Remote Clients" in DTC config.
You could open the DTC config by running dcomcnfg, Component Services -> Computers -> My Computer -> Distributed Transaction Coordinator -> Right click to Local DTC -> Security.
If this is still not working, the issue may be caused by the connectionString, you could share the connectionString with us, we could help you better.
Regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
PDF Printer and Acrobat fail to open or run or anything else.
Hi
Adobe Acrobat Standard 9 has been installed on this TS2008 (VM) server for over a year without problem until recently.
To start, the Adobe PDF printer stopped creating PDFs. When it worked a user would print and the PDF (creation) progress bar dialog box would open and the Adobe Distiller icon would appear in the taskbar (swirling) and a PDF would be created. Now we get the progress bar but no Distiller icon and no PDF is created.
Then Adobe Acrobat Standard (editor) failed to open any PDFs. We installed Adobe Acrobat 9 reader which opened PDFs for a while and now that has stopped working.
After many uninstalls, reinstalls, reg cleans we decided to open a case with Adobe who told us that Acrobat 9 is not supported on Server2008. The customer purchased Adobe Acrobat X.
We installed Acrobat X (in terminal server mode) and all was well for around 24hrs and then it all stopped working again.
I have since uninstalled reinstalled again. I created 1 PDF and after that the progress bar just hangs. We performed a controlled user logon to the server and all was going well until one user logged in and he isnt able to open Acrobat to read or edit PDFs.
There are no events logs which appear to directly relate to this. We were concerned about a HpBIDI driver which no longer errors but we do have a large amount of EventID 7036, ServerControl Manager Eventlog provider and EventID 4 SpoolerWin32SPL.
We have since been back to Adobe Support who advised us to unplug the network cable which we cannot do as its a hosted VM (with no access to the the VM console). He then asked us to remove the server from the Domain which we can't do as this is a single live server. They intend to come back to me!
We are really at a loss here for idea's, can anyone please provide some clues?
ThanksHi billu54860732,
Try running the Repair command from under the Help menu to see if it corrects the problem.
The probable cause of the error is, multiple processes of Acrobat/Reader running in the background.
If 'Repair' doesn't resolve the issue kindly follow the steps mentioned below and check, if it helps.
1) Press CTRL+ALT+DEL together
2) Go to the Task Manager
3) Go to Processes in the Task Manager and kill al the processes related to Acrobat/Reader.
4) Launch Reader/Acrobat (It should launch without an error).
To further isolate the issue you might want to run Acrobat/Reader in an environment where no other services are running.
This can be achieved via "MSCONFIG"
1) Click on start type run
2) Type MSCONFIG in the run prompt
3) Go to services and click on hide all Microsoft services
4) Click disable all
5) Go to the startup in configuration window and disable all startup items
6) Restart your system
7) Launch Acrobat/Reader
If, it is launched without an error, a service on your system is conflicting with Acrobat/Reader.
Let me know if issue persist.
Regards,
Aadesh -
Failed to open the connection. Error in the Designer when copying ...
I have two different systems I am developing an application on.
I copy the entire directory from one system to the other. Both systems have the same environment:
Visual Studio 2010
Crystal Reports for Visual Studio 2010 (the production release, or I think it is the vesion is 13.0.2.0 is the version on the assemblies)
SQL 2008 R2
Today, I started adding Crystal reports to this VS solution. I have a reportdriver class that exports all the reports to an HTTP Stream, but we can sit that aside for now. The problem I am having is strictly with the integrated designer.
I have a bunch of existing reports written for an old Sybase databse. I have ported them to SQL and the table structure matches. I simply add the report to my project, point it to the new datasource (using "Set Datasource Location" - OLE ADO SQL) and then preview the report to be sure it runs.
I am just using "localhost" as my server name for the OLE connection so I...in theory... don't have to change the data source to view it on the other system. Both systems have SQL 2008 R2 installed locally. For my login credentials, I use SQL Security and use the same database login/password on both development machines andthe production server.
Today, I copied my entire project to the other PC (as I do almost every day).. When I open any of the reports (in VS) and try to preview them I get:
Failed to open the connection.
Details: ADO Error Code: 0x80004005
Source: Microsoft OLE DB Provide for SQL Server
Description: [DBNETLIB][ConnectionOpen (Connect().]SQL Server does not exist or access denied.
SQL State: 08001
Native Error: 17 [Database Vendor Code: 17]
I can only guess that I am using two different OLE ADO drivers on the two systems or there is something embedded in the rport or somewhere in my solution that "knows" I am not really on the same system that I initially set them up on and previewd them with.
Am I on the right track? Any idea how I can fix this? Obviously, I don't want to have to setup the datasource for every report in my application (if I do that, the report works) when I copy it from the development to the production server.
I am in a real bind here and under a fast aproaching deadline. Any help is much appreciated!!!
ShayneDon't use localhost as your server name. It's a reserved name and should not be used in code.
Try this also [Kbase |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333433363339%7D.do] SAP Note 1553469 - How to enable Database logging in Crystal Reports for Visual Studio 2010
Edited by: Don Williams on Jan 30, 2011 6:02 AM -
Named Pipes Provider: Could not open a connection to SQL Server [2]
Hi
I'm a complete sql/asp.net newbie and want to try this tutorial:
http://beta.asp.net/GuidedTour/
First I installed:
Visual Web Developer 2005 Express Edition Beta 2
systemsettings\software shows the "sql server 2005 express edition ctp (sqlexpress)" installed
mmc\service shows me the SQL Server (SQLExpress) is running
Following the guided tour I use the commandline, type cmd, and type in the commandbox:
"C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLCMD90" -S "localhost\SqlExpress"
Instead of localhost I also tried computername.smallbusiness.local (thats my fully domain name).
However I always receive the error:
Named Pipes Provider: Could not open a connection to SQL Server [2]
Thank you very much for all your helpTypically I have found problems with connection strings as one of a few things:
1. Your instance is named different than the default. I labeled mine BrettSQLServer instead of the regular instance.
2. Your default storage of the your database has a user the system does not like and won't give it access.
3. You have ports blocked that SQL Server is trying to access.
1. Your instance should show up under 'SQL Server Configuration Manager'. Start>MS SQL Server 2008 > Configuration Tools> SQL Server Configuration Manager. You should see a left view panel where you can click 'SQL Server Services'. This
will show on the right all of your SQL services that are running. The most important one is SQL Server({Your SQL Server Name}). You will see column headers's displaying: "Name, State, Start Mode, Log on as, ProcessID" by default. If
you don't see a version of this you may have no installed SQL server properly and gotten SQL management studio but not the server. If you have the server and it's off or not running that is another problem. If your "LOG On AS" is a service account
is "NT ...." or something besides "Local System" that may be a problem. Without getting into the symantecs of protection suffice to say you log in with less than system, yes you are more secure but some built in functions for connections may not work.
2. Going off of rights of your 'Log On As' I WOULD USE 'System' NOT "NT Authority....". The reason is that you can access less things with 'NT Authority....' but yes you are more secure for that reason. If you are just trying to connect at home
to test non secure things I don't see the harm. If you are setting up a database for a multinational corporation than, Yes I would use a more secure account. If you need to change it while still in SQL Server Confi Manager: Right Click> SQL
Server(Your Version) > On 'Log On' tab > Choose drop down for 'Built-in Account' select 'Local System'. As extra steps make sure by some strange reason your database locales have this user by default(They should). MS likes to install database
as default to: C:\Program Files\Microsoft SQL Server\MSSQL10.{instanceName}\MSSQL. If you go to this location by going: right click>Properties>Security Tab .. and you fail to see your user that SQL server is defined as you may have lots of
issues.
3. Turn off Windows Firewall during SQL installation. If you are scared of being attacked during this down window, disconnect your NIC and reconnect later. I have not added a port manually in a while but it is simply easier to just
turn off your firewall during install. Having your TCP/IP connection from SQL Server blocked is kind of bad if you need to connect to it that way later.
Problems most commonly encountered with SQL Server by users I have seen and I myself encountered a lot with full blown SQL Server Enterprise as well as Express versions of SQL:
Connection string DO not work for BIDS, ADO.net, Linq, etc...
Once you follow steps above just go {ComputerName}\{SQL Server Instance} as your connection name. That mostly always works. As a preliminary test you should install SQL Management Studio first before doing connection strings for a basic test
that it can access your server. When you first boot it up and click 'New Database Engine Query' it will display Server Type: "Database Engine" and a blank field or autopopulated field for 'Servername'. The {ComputerName}\{SQL Server Instance} almost
always works. If it works and you can connect, you know that you have access, if you don't start there first before getting into connection strings through .NET languages. I suggest just adding an easy alias, my local SQL box is simply called
'Brett'. Go again back to SQL Server Configuration Manager. On the left side click 'SQL Native Client ...' > 'Aliases' > New > type in whatever you want. Go back to the left pane click on 'SQL Server Services' ensure the service
'SQL Server Browser' is running and set to run automatic. Have fun accessing SQL Server with your alias.
Help I can't get FileStream to work and I ran 'spconfigure' in SQL and it still doesn't work.
Kind of annoying that more sites don't list that it is entirely in the Configuration manager and has zilch to do with setting the option if the config has it off. I am not a master of the sp_configure TSQL access method but I know during installs turning
it on fails to REALLY turn it on. Once again go to SQL Config Manger > SQL Server Services > Right click your instance > Select FILESTREAM tab > enable both check boxes. Restart SQL Server. Install Adventureworks 2008 and whatever
else failed due to filestream access levels.
Medium to Advanced on some things, but always wanting to know more -
Error: Failed to open the connection
Hi all,
I have use Crystal Report 2008 to construct a report which access mySQL via ODBC. HOwever, I am fail to publish it to InfoView.
It always display the following error:
ERROR [PublishingService:HandlerPool-14] BusinessObjects_PublicationAdminErrorLog_Instance_2467 - [Publication ID # 2467] - Document job "Report2a.rpt" (id 2,475) scheduling failed: Failed to open the connection. ~tmp1356563301f0e10.rpt. (FBE60502)
My BOE(XI 3.0) is installed in SUSE Linux Enterprise 9 x86 and have tested the ODBC connection via isql and it can be connected.
Can anyone help to identify the problem? Or any procedure can be provided to publish the crystal report to InfoView.
Thank you so much.Hi all,
I have use Crystal Report 2008 to construct a report which access mySQL via ODBC. HOwever, I am fail to publish it to InfoView.
It always display the following error:
ERROR [PublishingService:HandlerPool-14] BusinessObjects_PublicationAdminErrorLog_Instance_2467 - [Publication ID # 2467] - Document job "Report2a.rpt" (id 2,475) scheduling failed: Failed to open the connection. ~tmp1356563301f0e10.rpt. (FBE60502)
My BOE(XI 3.0) is installed in SUSE Linux Enterprise 9 x86 and have tested the ODBC connection via isql and it can be connected.
Can anyone help to identify the problem? Or any procedure can be provided to publish the crystal report to InfoView.
Thank you so much. -
CrystalReportViewer Failed to Open the connection Unable to retrieve Object
I am getting the following Error on trying to view a report in the CMC and the Infoview.
CrystalReportViewer
Failed to Open the connection. ReportName
Unable to retrieve Object.
Failed to open the connection. ReportName
I have recently re-installed Crystal Reports Server XI on a server after a disk failure. I had a backup of my CMS database. I reinstalled the Crystal Servwer without atttaching this database, however crystal did not create a new db so I attached my old one.
I have deleted all my old ODBC connections and recreated them with new names and then reconnected my reports in Crystal Reports XI using the "Set Datasource Location" option and the report works fine.But as soon as I try to view it after uploading it as an object onto the server, I get the above error.
Any help would be appreciated.I am tagging into this unanswered question as well because I think I have a similar issue. In my case I have a report which runs correctly in Crystal Reports designer but when I move it to the scheduler it fails on a "Failed to connect" to the report. In have used "Set data location" to no avail. When I go to Admin Tools and look at the complete list of datasources for all my reports this particular datasource is listed twice. The group of reports under one of the datasources works correctly. The reports listed under the second datasource all fail. The two datsources are spelled exactly the same and when I sompare the database details for a successfull and a failing report using this datasource they are the same (in the console and in infoview).
I have also checked the ODBC connections on the Crystalserver and there is only one occureence.
Any ideas?
Thanks! -
Error"Failed to open the connection" - Named Instance of SQL Server 2005
"Failed to open the connection" error, when connecting to the Named Instance of SQL Server 2005
The report is throwing error, when changing the logon information dynamically through C#.
Code
string reportPath = @"D:\NET\TestReport\TestReport.rpt";
ReportDocument reportDocument = new ReportDocument();
reportDocument.Load(reportPath);
foreach(CrystalDecisions.CrystalReports.Engine.Table table in tables)
TableLogOnInfo tableLogonInfo = table.LogOnInfo;
tableLogonInfo.ConnectionInfo.ServerName = @"TestServer\Instance1"; //Connnecting to Named instance of SQL Server 2005
tableLogonInfo.ConnectionInfo.UserID = "sa";
tableLogonInfo.ConnectionInfo.Password = "password";
tableLogonInfo.ConnectionInfo.DatabaseName = "TEST_DB";
table.ApplyLogOnInfo(tableLogonInfo);
crystalReportViewer1.ReportSource = reportDocument;
Error Message
Failed to open the connection.
Failed to open the connection.
C:\DOCUME1\PUGALE1\LOCALS~1\Temp\{DF9593A5-5C80-4CBC-ABC3-EC4EF204A7EB}.rpt
The error is occuring only whenever i am connecting to the Named Instance of SQL Server 2005.
Thanks in Advance
Edited by: pugalendran p on Feb 2, 2009 10:32 AM
Edited by: pugalendran p on Feb 2, 2009 10:43 AMHi,
Following solution might help you to resolve the issue.
Solution1:
Issue happens because universe connection to the Database is not responding and the Data Source Name is not configured to write SQL Server 2005 database.
Resolution
Created new DSN connection under SYSTEM DSN to SQL Server 2005 Database.
Import the universe from the designer.
Go to File->Parameters.
Edit Connection.
On the Database Middleware Page expand SQl Server 2005->Select SQL Server 2005 driver.
Change the DSN to new DSN connection
Test the connection.
Save the Universe and Export it to the repository.
Solution2:
I am taking Oracle as an example over here.
This can be caused when the SQLNET.ora is located in a remote location using mapped drives.
Resolution
To resolve,
check the registry [HKLM\SOFTWARE\ORACLE] you should see a folder called HOME0
look for any paths that contain a mapped drive partition
Change the mapped drive letter to a UNC path (
server\folder)
Open a command prompt and do a tnsping using the tnsname and verify the location of the SQLNET.ora or TNSNAMES.ora
If the path is not updated to the new path
Reboot the server
Regards,
Sarbhjeet Kaur -
Getting Error:Failed to open the connection while calling crystal report
I am getting the below error while calling the crystal report from dot net app. I am using OLEDB to connect to database. It is working perfectly in our DEV environment but as soon as I move it to production information after changing the logon information in the report it start giving the below error.
Failed to open the connection.C:\WINDOWS\TEMP{C2FD97D9-2ADE-41BB-88FF-23A4DF20BC6F}.rpt
Details: [Database Vendor Code: 17 ]Are you able to connect to the database from the production machine using a UDL file?
If you haven't tried this, here's how to do it. Take these steps on the machine that is hosting the application. Create a new text file on the desktop. Change the file extension to ".udl" (without the quotes). Double-click on this to bring up the OLEDB connection test: start on the Provider tab and select the appropriate provider. Click "Next" and on the following tab enter your connection information. Click the "Test Connection" button to test the connection. Does it connect to the database successfully?
If you click on "OK" to close the dialog and then open the UDL file with Notepad, you should see an OLEDB connection string. In this string should be the same property values for server, database, user id and password which you are providing through your application. If they are not the same, modify your application to use these values.
If testing your connection information with the UDL file works but your application is still failing when using the same credentials, try profiling or tracing the database. Do you see connection attempts from the application? Are there any errors?
If you're impersonating, have you set up windows authentication correctly for both the application and the database? -
Error: Failed to open the connection when opening Crystal Report in CMC or
Hello all,
I am getting theError: Failed to open the connection when opening Crystal Report in CMC or Infoview
with access database as the datasource which is in the network drive.Hi Sonali,
This is because Crystal Reports does not recognize database connection from share drive
1. Save the database locally on server machine
2. Create a new database on server and link the new database with the database on Network.
Steps to link the database.
1.Create a new test database on server.
2. Go to File --> Get External Data --> Link tables | Select the database on Network Drive.
3. Select all the tables from the database.
4. Save the Database e.g. Test.mdb.
5. Create an ODBC Connection on server machine, with the same name as on client machine using test.mdb database.
Note: Click on Advanced button, enter the default user id and password for the odbc connection, it is not mandatory to give Login Name and Password, only if the user id and password are given then we need to provide the same user id and password in the CMC database configuration.
6. Create a report using this ODBC connection, and save the report to Enterprise.
Regards,
Navin -
Failed to open the connection: Error Code 17
Here's an odd one.
Environment:
VB.NET Winform
Visual Studio 2008
.NET framework 2.0
Crystal Reports 2008
ODBC connection
I have three reports, living in the same directory. They are essentially identical, except for the grouping. All three run successfully within Crystal reports.
From a report viewer Winform in VS, two of the three run. As I am dealing with a small data set, the reports render quickly. On the third report, There is a long pause when the report viewer form opens, then I finally get an error:
"Failed to open the connection.
Details: [Database Vendor Code: 17]
Failed to open the connection.
CallReportByExtension 58F5C135-7BA3-4215-898A-DADA6C7DAD9C.rpt
Details:[Database Vendor Code: 17]
I was initially getting similar errors on all three reports, before changing the datasource location to my ODBC connection. I have double-checked the location, verified the database, etc.
What am I doing wrong? I can provide the VB code if requested, but since the other two reports work properly, I doubt it's code. I do know that I am passing the report name and path correctly to the report viewer form.
As I am about to kick my monitor through the window and become a street denizen, I would greatly appreciate any help that would be offered.
Thanks,
Mike BecknerThanks for the reply. This code works...two of the three reports work.
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class frmReportViewer
Dim m_datStartDate As Date
Dim m_datEndDate As Date
Dim m_strReportPath As String
Dim m_strReportName As String
Dim m_strStaticPath As String = "c:\Program Files\CallReportViewer\Reports\"
Dim crConnectionInfo As New ConnectionInfo
*****Omitting property declarations--I assign the report name and path via these properties. *****
Private Sub frmReportViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
LoadReport()
End Sub
Public Sub LoadReport()
Dim crReportDocument As New ReportDocument
Dim crTableLogonInfo As New TableLogOnInfo
Dim crTables As Tables
Dim crTable As Table
Try
With crConnectionInfo
.ServerName = "CallWhereData"
.DatabaseName = "CallWhereData"
.UserID = "MyID"
.Password = "MyPassword"
End With
Me.Text = m_strReportName
crReportDocument.Load(m_strStaticPath & m_strReportPath)
crReportDocument.SetParameterValue("1StartDate", m_datStartDate)
crReportDocument.SetParameterValue("2EndDate", m_datEndDate)
crTables = crReportDocument.Database.Tables
For Each crTable In crTables
crTableLogonInfo = crTable.LogOnInfo
crTableLogonInfo.ConnectionInfo = crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogonInfo)
Next
CrystalReportViewer1.Dock = DockStyle.Fill
CrystalReportViewer1.ReportSource = crReportDocument
Catch ex As Exception
MessageBox.Show(Err.Description)
End Try
End Sub
End Class -
Failed to open the connection - database vendor code 17
I'm upgrading a VB.net Windows Forms application from 1.1 to 4.0. In the reporting form, the list of reports you can choose are pulled from a folder where the .rpt files reside. Once the user chooses a report and executes it, vb code populates the current database connection information and displays the report in the report viewer control.
The following things are true:
- Version 1.1 works on my systems and my customers systems
- The code has not been changed, except that it now targets .Net 4.0 instead of 1.1
- The exact same .rpt files are being used
- Version 4.0 connects to the same database my customer is using, and I can run the reports just fine from here.
- Version 4.0 is able to connect to the database just fine from my customers systems (using the same connection information provided to the report)
- My customer installed this: http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_2.zip
The only problem is that my customer encounters this error when trying to run any report from his systems:
Failed to open the connection.
Details: Database Vendor Code: 17
Failed to open the connection.
Orders.BOL.TaskDetail {393C9017-0ED1-4E1E-8824-E222F4B9D14C}.rpt
Details: Database Vendor Code: 17
I read all of the articles I could find, and they either don't describe this exact situation, or there is insufficient information for troubleshooting this issue. Are there steps that I've missed to make Crystal Reports for VS2010 work on my customer's systems?
Your help is appreciated,
MarkHi Mark,
More information required -
- Does this happen with all reports or few?
- What is the connection type used for the report to connect to the database (OLEDB,ODBC etc)
- Are you changing the database at runtime?
few things you could check
- Check if the database is accaessible from the client machine with proper permissions / rights.
- If its an ODBC connection check if the DSN with same name is created on the client machine.
- Check the driver / provided used by the report to connect to the DB, verify that the same is installed on the client machine. (SQL NAtive client, SQL Server etc)
Also take a look at below articles discussing the simillar issue.
[CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]|CR for VS2010: Failed to Open Connection [Database Vendor Code: 17 ]]
[1474461 - Unknown Database Connector Error when connecting to a Dataset in a VS .NET application |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433373334333433363331%7D.do]
Hope this helps,
- Bhushan.
Maybe you are looking for
-
When I search a music artist in the itunes store and then click to view all albums the screen is blank. Why is itunes store not showing me all of the Albums?
-
Flex Builder Beta M4 uninstall failure
Flex builder beta M4 has expired 53 days earlier than promised. But that's little trouble. Awful trouble is that it is refusing to uninstall. When I am trying to uninstall, it says this, quote: quote: java.lang.InternalError: jzentry == 0, jzfile = 8
-
Oracle SQL Developer needs some work
I just downloaded a copy today (1557) for Oracle 9.2i / Windows XP Pro Oracle SQL Developer has a few glitches... A compiled and working package (compiled in SQL*Plus and TOAD) opens and shows 2 errors in a SQL Query involving a CASE statement. Inval
-
This is what the Print Dialog looks like. The print preview is too small. The final printed images are coming out all wrong. This is happening for ALL DRIVERS (5 different printers) and 2 different USERS in our company. It doesn't matter if you chang
-
Profit Center Reports for Sub Ledger
Hi What are the standard Reports for Profit Center wise Trial Balance for Vendors & Customers? Regards Rupal