cool hit counter CrystalReports 2008 (Crystal Reports) JDBC connection to mysql database_Intefrankly

CrystalReports 2008 (Crystal Reports) JDBC connection to mysql database


In this blog, the main focus is on Crystal Reports 2008 using JDBC to connect to mysql databases.

In between connections, first make sure you have a mysql database installed on all your computers.

Secondly, there are the relevant jar packages used by jdbc when connecting to data.

Next, it's time to do some connection operations to the database.

For those who don't know much about JDBC, you can go to JDBC connection to database code and steps in complete java development Understand the operations involved

1.Open Crystal Reports' Data Expert

2.Clicking on JDBC (JNDI) brings up.

3.Enter the url and database class name and click Next.

4.Enter the password and user id

Just click Finish.

5.However, before this can operate, here are the steps you need to do.

In the Crystal Reports directory of your installation.

The directory I installed is: D:crystal reports 2008Common4.0java

Under this directory, there is a file: the CRConfig.xml configuration file

D:crystal reports 2008Common4.0javaCRConfig.xml

 1 <?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
 2     <reportlocation>../..</reportlocation>
 3     <timeout>10</timeout>
 4     
 5     <ExternalFunctionLibraryClassNames> 
 6         <classname> </classname>
 7         <classname> </classname>
 8     </ExternalFunctionLibraryClassNames>
 9     
10 <keycode>CFKOA-YOTTM2M-OOUFAFF-N43M</keycode>
11 <Javaserver-configuration>
12 <DataDriverCommon>
13     <JavaDir>D:crystal reports 2008javasdkin</JavaDir>
14     <Classpath>D:crystal reports 2008Common4.0java/lib/mysql-connector-java-5.1.10-bin.jar;D:crystal reports 2008Common4.0java/lib/crlovmanifest.jar;D:crystal reports 2008Common4.0java/lib/CRLOVExternal.jar;D:crystal reports 2008Common4.0java/lib/CRDBJDBCServer.jar;D:crystal reports 2008Common4.0java/lib/CRDBXMLServer.jar;D:crystal reports 2008Common4.0java/lib/CRDBJavaBeansServer.jar;D:crystal reports 2008Common4.0java/lib/external/CRDBXMLExternal.jar;D:crystal reports 2008Common4.0java/lib/external/log4j.jar;D:crystal reports 2008Common4.0java/lib/CRDBSForceServer.jar;D:crystal reports 2008Common4.0java/lib/external/CRDBSForceExternal.jar;${CLASSPATH}</Classpath>
15     <IORFileLocation>${TEMP}</IORFileLocation>
16     <JavaServerTimeout>1800</JavaServerTimeout>
17     <JavaServerStartupTimeout>30</JavaServerStartupTimeout>
18     <JVMMaxHeap>64000000</JVMMaxHeap>
19     <JVMMinHeap>32000000</JVMMinHeap>
20     <NumberOfThreads>100</NumberOfThreads>
21 </DataDriverCommon>
22 <JDBC>
23     <CacheRowSetSize>100</CacheRowSetSize>
24     <JDBCURL></JDBCURL>
25     <JDBCClassName></JDBCClassName>
26     <JDBCUserName></JDBCUserName>
27     <JNDIURL></JNDIURL>
28     <JNDIConnectionFactory></JNDIConnectionFactory>
29     <JNDIInitContext>/</JNDIInitContext>
30     <JNDIUserName>weblogic</JNDIUserName>
31     <GenericJDBCDriver>
32         <Default>
33             <ServerType>UNKNOWN</ServerType>
34             <QuoteIdentifierOnOff>ON</QuoteIdentifierOnOff>
35             <StoredProcType>Standard</StoredProcType>
36             <LogonStyle>Standard</LogonStyle>
37         </Default>
38         <Sybase>
39             <ServerType>SYBASE</ServerType>
40             <QuoteIdentifierOnOff>OFF</QuoteIdentifierOnOff>
41             <DriverClassName>com.sybase.jdbc2.jdbc.SybDriver</DriverClassName>
42             <StoredProcType>Standard</StoredProcType>
43             <LogonStyle>MySQL</LogonStyle>
44         </Sybase>
45     </GenericJDBCDriver>
46 </JDBC>
47 <XML>
48     <CacheRowSetSize>100</CacheRowSetSize>
49     <PreReadNBytes>4096</PreReadNBytes>
50     <MaxCacheXMLSize>153600</MaxCacheXMLSize>
51     <XMLLocalURL></XMLLocalURL>
52     <SchemaLocalURL></SchemaLocalURL>
53     <XMLHttpURL></XMLHttpURL>
54     <SchemaHttpURL></SchemaHttpURL>
55     <RepositoryPath>D:crystal reports 2008Common4.0java/lib/external</RepositoryPath>
56     <ExternalNamespace>D:crystal reports 2008Common4.0java/xsd/wsdl.xsd;D:crystal reports 2008Common4.0java/xsd/wsdl_encoding.xsd</ExternalNamespace>
57     <SocketTimeout>60000</SocketTimeout>
58 </XML>
59 <JavaBeans>
60     <CacheRowSetSize>100</CacheRowSetSize>
61     <JavaBeansClassPath></JavaBeansClassPath>
62 </JavaBeans>
63 <SForce>
64          <CacheRowSetSize>100</CacheRowSetSize>
65          <QueryBatchSize>2000</QueryBatchSize>
66          <SocketTimeout>600000</SocketTimeout>
67          <UseProxy>FALSE</UseProxy>
68          <ProxyAddress>
69          </ProxyAddress>
70          <ProxyPort>
71          </ProxyPort>
72          <BatchLookupCacheJoinSize>200</BatchLookupCacheJoinSize>
73 </SForce>
74 </Javaserver-configuration>
75 </CrystalReportEngine-configuration>

(located) atxml file, Red part, That's what we added, i.e. puttingjar The path to the package is added to the<Classpath> Go inside.。

6.And before that, we need to do the following.

I.e., the use of the.mysql-connector-java-5.1.10-bin.jar package into the directory shown below.

Renderings.

E | hongtenzone@foxmail.com B |http://www.cnblogs.com/hongten


Recommended>>
1、Chen Yibin President of Fujian Blockchain Association Delivers Speech Blockchain Empowers the Real Economy
2、Where is the first windfall of blockchain landing applications No other than content distribution
3、Sharing electronic medical records is only as hard as it is brave
4、Microsoft officially announced the acquisition of code hosting platform GitHub for 75 billionradical in Chinese characters Kangxi radical 2Titanium Express
5、Zhengzhou Metro introduces artificial intelligence robot to officially meet passengers in the near future

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号