I have coded a program in VB.NET which is for making proposal and printing invoices. I can connect to my VPS MySQL (Mariadb) database via my software and everything works fine (ADD/UPDATE/DELETE strings). But I also need to gather data from my database to print invoices. For making this I am using Crystal Reports XI Release 2. I need to connect Crystal Reports to my online MySQL database which is located in my VPS to get data and make the invoice ready to print.
Connection options for Crystal Reports are :
Access/Excel (DAO)
ADO.NET(XML)
Database Files
Exchange 5.5 Message Tracking Log
Exchange Message Tracking Log
Legacy Exchange
Mailbox Admin
ODBC (RDO)
Olap
OLE DB (ADO)
Microsoft Jet 4.0 OLE DB Provider
Microsoft Office 12.0 Access Database Engine
Microsoft OLE DB Provider for Analysis Service
Microsoft OLE DB Provider for Indexing Service
Microsoft OLE DB Provider for ODBC Drivers
Microsoft OLE DB Provider for Oracle
Microsoft OLE DB Provider for Search
Microsoft OLE DB Provider for SQL Server
Microsoft OLE DB Simple Provider
MSDataShape
OLE DB Provider for Microsoft Directory Service
SQL Server Native Client 11.0
Outlook/Exchange
Public Folder ACL
Public Folder Admin
Public Folder Replica
Universes
XML
I tried to connect to the VPS database in Crystal Reports with the following steps :
In Database expert menu I am selecting OLE DB (ADO) and then selecting Microsoft OLE DB Provider for SQL Server. Then it asks me Server, UserID, Password, Database. I am filling the fields but when I try to select database it shows nothing. When I leave the database field empty and click on next then it give me the following message:
Failed to open the connection.
Details: ADO Error Code:0x
Source: Microsoft OLE DB Provider for SQL Server
Description : [DBNETLIB][ConnectionOpen (Connect().]SQL Server does not exist or access denied.
SQL State:08001
Native Error: [Database Vendor Code:17]
I've solved that issue with following steps (Assuming MySQL Connector/ODBC already installed in your system) :
Add a new connection from ODBC Data Source Administrator
Select MySQL ODBC 5.3 ANSI Driver
Select TCP/IP radio button and enter your VPS server's IP address
with port number 3306
Fill User and Password field with you database username and database
password
Select your database from the drop down list
Click Test button and if everything works fine than click Ok
Select database expert under Database menu
Select ODBC (RDO) under Create New Connection menu
Select your connection and click Next
Enter your database user name and password and click Finish
Add required tables from your database by selecting the table and
clicking arrow button.
If you already created a design then open your design in Crystal Report and follow these steps:
Select Set Datasource Location under Database menu
Select ODBC (RDO) under Create New Connection menu which is located
in "Replace With" section
Select your connection and click Next
Enter your database user name and password and click Finish
Now select one of your previous tables from "Current Datasource" tab
and select the same table in "Replace With" tab then click update. Do it for all tables one by one.
Click close.
Hope this helps.
Related
I have Microsoft SQL Server Report Builder 3.0 that I use from SQL Server Reporting Services 2012. My machine has 64 bit Windows 7. I am able to use report builder fine when I connect to SQL Server DB. Now I want to connect to a MySQL DB (version 5.1.73).
What I have done so far:
1) I have installed 32-bit version of "MySQL ODBC Connector Unicode 5.3.8". I have installed 32-bit version as the Report Builder is a 32 bit application and so needs 32-bit version.
2) Then I have added entry for the MySQL DB in the "System DSN" by selecting the "MySQL ODBC 5.3 Unicode Driver" that i had installed. As my machine is 64 bit, I have added this entry in "System DSN" of "ODBC Data Source Administrator" located at C:\Windows\SysWOW64\odbcad32.exe
3) Then from report builder I am trying to create new Data Set and a new data source connection to this data set. I am selecting connection type as "ODBC" and click on "Build".
4) In "Connection Properties" window I select "Use user or system data source name:" and picking the DSN name that I have added in the "System DSN" tab of "ODBC Data Source Administrator".
5) After I click "Test Connection" it shows "Test connection succeeded".
6) When I click OK on the success message and "Connection Properties" window I come to "Data Source Properties" and see "Connection string:" is set to "Dsn=MySQLforCAD_UAT". MySQLforCAD_UAT is the DSN name I had entered in "System DSN" of "ODBC Data Source Administrator".
The problem: When I click on "Test Connection" from this window, I get error as
What I have tried so far: I have tried selecting "Use connection string" instead of "Use user or system data source name:" and tried few combinations of Dsn=MySQLforCAD_UAT;trusted_connection=Yes
Dsn=MySQLforCAD_UAT;description=<DSN description>;server=<DB Server IP>;uid=<DB user id>;database=<database name>;port=3306
My Questions:
1) Why is report builder saying connection succeeded at one place and failure at the other? How can I correct this so I can connect to MySQL DB?
2) I don't have admin rights on my machine and the "System DSN" entries need admin access to be able to edit/add it. Could this be causing the problem in case if admin access is needed even to use the details I have added in "System DSN" (with help of local admin)
I used a different approach by creating a linked server. To do it, I followed instructions from this link. Thank you to the author (I couldn't find a name there)
I am using Microsoft SQL Server Report Builder 3.0. And I have remote Linux Server(with certain IP) that have MySQL database. I want connect this MySQL database from Report Builder (in my PC), So that I can create some reports about it. How can i do that? Please help and Thanks.
First, you need to download and install (32-bit or 64-bit) appropriate MySQL connector.
MySQL ODBC connector
After installation, you need to create ODBC Data Source Name (DSN) on this way:
Open Control Panel -> Administrative Tools -> ODBC Data Sources (32-bit or 64-bit, depending of installed connector)
Choose System DSN tab and click on Add
In dialog window, choose installed connector for MySQL
In new dialog window populate Data source name field with descriptive name, fill MySQL server address and port (IP address or server network name) and fill credentials that have enough permissions to MySQL server. Catalog field is optional field. Test the connection.
Open Microsoft Report Builder 3.0, and create new report. While creating dataset, you need to choose data source. Click New Data Source (or just New) and in the dialog window for Connection type, choose ODBC and in the Connection string choose Build option.
In new dialog window, in Data source specification section choose your DSN that you created in stages 2, 3 and 4 and test connection.
Voila :)
Hi I am using MS Access and have used mysql odbc to connect to a remote mysql server database. I have already set ip address on cpanel remote mysql section to allow my ms access database to connect with that. I managed to link to this database from MS Access and linked tables are imported in my ms access database but as soon as I try to open those table from ms access I get message that connection lost. What could be the reason why connection is lost when I try to open remote mysql database table in MS Access. Is this some firewall stopping it .. what could be the solution. If Cpanel has remote mysql then does it not mean that it supports remote access. I want to have a non disconnecting connection with my ms access database and possibly I have a plan to extend it to multiple users and convert this to a single database and multiple users application with each user with a copy of access database. Kindly reply thanks.
Im having trouble using the MySQL ODBC connector.
I have a MS access frontend that im trying to connect to a MySQL DB. It connects fine when running the frontend and DB on my dev machine.
I have moved the front end and DB onto the clients server. The clients assess the fornt end via a shared folder on the individual user PCs. I have set up a file DSN ODBC connection as below. When i open the front end on one of the clients PCs i get the ODBC--call failed.
How do i get the linked tables to look at the server MySQL DB considering ms access is not installed on the server. I have tried to set uo the file DSN via the users pc i.e. open linked table manager and open the File DSN get the ODBC--call failed on connect.
File DSN set up
[ODBC]
DRIVER=MySQL ODBC 5.3 Unicode Driver
UID=root
PASSWORD=root
DFLT_BIGINT_BIND_STR=1
PORT=3306
DATABASE=productionlist_be
SERVER=localhost
thanks in advance Kelly
Welcome to stack-overflow Kelly.
You are missing few points.
The MySQL database Server must be accessible by all your clients.
Either a local machine hosting MySQL server or from internet its up
to you
Must have a static IP or domain name.
Access Front-Ends should not be shared but sent to all of your clients/employees
(This way you are achieving true "multi user access" and thats the main idea behind front and back ends)
All of your client PC must have MySQL ODBC driver installed
All of your clients must have required version of Access or Access Runtime installed
Only after setting up all this, you can think about distributing your application to your clients.
Modify your File DSN replace the localhost with the MySQL Database server ip
like
SERVER=SERVER_NAME_OR_IP
Also it is best to refresh the odbc links via VBA code
you will find much help here:
How do you programmatically update a linked table in Access that will refresh data types too?
OR
Relinking database tables: Access, VBA
hope this helps to get started :)
In SQL Server 2000, I'm trying to create a linked server to SQL Server 2008. Everything I've tried raises errors of one flavor or another.
In SQL Server 2000 Enterprise Manager, I:
Right-click Linked Servers under the server's Security node, then choose New Linked Server... and name the link "SQL2008R2"
I choose the "Other data source" radio button because I don't think SQL Server 2000 can natively connect to 2008.
I choose "SQL Server Native Client 10.0" in the Provider name field, type "SQL2008R2" in the Product name field, enter "VIRTUALXP-62910\SQLEXPRESS" (Servername and named instance name) in the Data source field, leave Provider string blank, and type the database name "RWUtils" in the Catalog field.
On the security tab, I type "Link" as the local login and as the Remote user, and enter the password. I choose the "Not be made" radio button for logins not listed above. I previously set up a "Link" user on both servers, with the same password, with access to the right databases.
I click OK to create the link. The SQL2008R2 link is created.
When I expand the link I just created and click on Tables, I get the error,
Error 7416: Access to the remote
server is denied because no
login-mapping exists.
Can anyone tell me what I'm doing wrong or what the correct sequence of steps or T-SQL is to create this link successfully?
Thanks much.
I just did this for the first time (after seeing your question) and it worked - going from SQL 2000 Standard 32-bit (default instance) to a named instance on SQL 2008 R2 64-bit.
Using similar steps to what you have above:
fine
choose "SQL Server" as the Server Type, enter servername\instance
not applicable
I chose "Be made using this security context", and entered in my new SQL Standard Account that exists on the target server only (2008 R2).
I tested with a query and it worked. Be sure new SQL Standard user has access to the database and table. Query should look like: select * from [linkedservername\instance].[database].[dbo].[table]
Other notes: I took the defaults on the Server Options tab, which are "Data Access", "RPC", and "RPC Out" all checked.
The other direction: I previously had it working the other direction from SQL 2008 R2 linked server to SQL 2000. That required this: http://blog.raffaeu.com/archive/2008/06/19/sql-2005-and-linked-server-cannot-obtain-the-schema-rowset.aspx.
I have use this steps and configuration options:
SqlServerEnterpriseManager\Security\Linked Servers\New Linked Server
General:
Linked server: mylinkedservername
Provider name: Microsoft OLE DB Prvider for SQL Server
Product name:
Data Source: (my server name)
Provider string:
Location:
Catalog:
Security:
Be made using this security context:
Remote login: (my sql remote user. I use sa for the test)
With password: (my remote password)
Server Options:
DataAccess: checked
RPC: checked
RPC Out: checked
Use Remote Collation: checked
Qry used in the test:
select * from [linkedservername].[database].dbo.[table]