Home Database Mysql Tutorial MSSQL7.0的数据迁移到MySQL上的一种方法_MySQL

MSSQL7.0的数据迁移到MySQL上的一种方法_MySQL

Jun 01, 2016 pm 01:54 PM
excel office slideshow use

想必大家都很喜欢用Word打字,用Excel进行计算和规划,用PowerPoint作幻灯片进行展示…,但是这只用到了Office系列产品的很少的一部分功能。据调查,绝大部分用户只用到了Office产品的20%的功能,很少有人注意到Visual Basic for Application。实际上,熟悉掌握VBA的功能可以使你的工作事半功倍,尤其对会计、金融等专业来说,作出一套好的宏,几乎可以作到一劳永逸!最近,AutoCAD中也加入了VBA的功能,这不能不说这是一个趋势!
  VBA的功能决不只是让病毒制造者用来制造麻烦的,VBA能被用来制造病毒的同时也正说明了其功能的强大与易用!利用ADO对象,可以很方便的进行数据库操作!下面就是一个简单的数据交换的例子:
  由于ADO对象不直接支持MySQL,所以必须先安装MyODBC, 后者也是一个免费产品,在www.mysql.org上有下载,安装好了MyODBC, 就可以在ODBC数据源管理中配置一个数据源名称,把它指向你想连接的MySQL数据库。代码如下:
  
  Sub connectMySQL()
  '通过MyODBC去连接MySQL数据库,并将Microsoft SQL Server 7
  '的数据转进mysql中
  Dim sConnect As String, sSql As String, i As Long
  Dim cnMSSQL As New ADODB.Connection
  Dim cnMySQL As New ADODB.Connection
  '声明并创建对象 连接
  Dim rs As New ADODB.Recordset '声明并创建对象 记录集
  Dim cm As New ADODB.Command '声明并创建对象 命令
  
  sConnect = "dsn=mysql1" '指定MySQL的数据源名称
  cnMySQL.Open sConnect '连接到 mysql
  
  sConnect="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;pwd=123456;Initial Catalog=softdown;Data Source=ntserver"
  '连接到 ms sql server 7
  cnMSSQL.Open sConnect
  
  'sSql = "create table softinfo (softNum smallint,softname varchar(70),softdesc blob," & _
  "softpath varchar(30),softleng varchar(10),softclass varchar(10),softsugest tinyint(1)," & _
  "softdown smallint(4))" '创建新的MySQL数据表语句
  sSql = "select * from softinfo order by softnum"
  rs.Open sSql, cnMSSQL, 1, 1
  
  While Not rs.EOF
  sSql = "insert into softinfo values (" & Trim(rs(0).Value) & ",'" & Trim(rs(1).Value) & _
  "','" & Trim(rs(2).Value) & "','" & Trim(rs(3).Value) & "','" & Trim(rs(4).Value) & _
  "','" & Trim(rs(5).Value) & "'," & Trim(rs(6).Value) & "," & Trim(rs(7).Value) & ")"
  
  cm.ActiveConnection = cnMySQL
  cm.CommandType = adCmdText
  cm.CommandText = sSql
  cm.Execute
  
  rs.MoveNext
  Wend
  
  rs.Close
  Set rs = Nothing
  
  cnMySQL.Close
  Set cnMySQL = Nothing
  
  cnMSSQL.Close
  Set cnMSSQL = Nothing
  
  End Sub

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to view word documents in vscode How to view word documents in vscode How to view word documents in vscode How to view word documents in vscode May 09, 2024 am 09:37 AM

First, open the vscode software on the computer, click the [Extension] icon on the left, as shown in ① in the figure. Then, enter [officeviewer] in the search box of the extension interface, as shown in ② in the figure. Then, from the search Select [officeviewer] to install in the results, as shown in ③ in the figure. Finally, open the file, such as docx, pdf, etc., as shown below

What to do if the xlsx file cannot be opened on mobile phone What to do if the xlsx file cannot be opened on mobile phone Apr 25, 2024 am 08:28 AM

Why can’t WPS and Excel documents be opened on Apple’s mobile phone? It shows that the file cannot be previewed. 1. The reason why WPS and Excel documents cannot be previewed on Apple’s mobile phone is because there are no applications that support these file formats installed on the mobile phone. The solution is to install an application that supports the document format. Application to convert documents to PDF format and send documents to computers or other devices for opening. 2. First check what the suffix of the file is. If it is an excel file but cannot be opened, it means that the file type is not registered in the computer's folder options. 3. First, open the QQ browser on your mobile phone; click the button in the middle below; click "File Download"; click "Document" to select the excel file you want to open. Summary Open QQ browsing

WPS and Office do not have Chinese fonts, and Chinese font names are displayed in English. WPS and Office do not have Chinese fonts, and Chinese font names are displayed in English. Jun 19, 2024 am 06:56 AM

My friend's computer, all Chinese fonts such as imitation Song, Kai style, Xing Kai, Microsoft Yahei, etc. cannot be found in WPS and OFFICE. The editor below will tell you how to solve this problem. The fonts in the system are normal, but all fonts in the WPS font options are not available, only cloud fonts. OFFICE only has English fonts, not any Chinese fonts. After installing different versions of WPS, English fonts are available, but there is also no Chinese font. Solution: Control Panel → Categories → Clock, Language, and Region → Change Display Language → (Region and Language) Management → (Language for Non-Unicode Programs) Change System Regional Settings → Chinese (Simplified, China) → Restart. Control Panel, change the view mode in the upper right corner to "Category", Clock, Language and Region, change

Xiaomi Mi Pad 6 series launches PC-level WPS Office in full quantity Xiaomi Mi Pad 6 series launches PC-level WPS Office in full quantity Apr 25, 2024 pm 09:10 PM

According to news from this site on April 25, Xiaomi officially announced today that Xiaomi Mi Pad 6, Mi Pad 6 Pro, Mi Pad 6 Max 14, and Mi Pad 6 S Pro now fully support PC-level WPSOffice. Among them, Xiaomi Mi Pad 6 Pro and Xiaomi Mi Pad 6 need to upgrade the system version to V816.0.4.0 and above before they can download WPSOfficePC from the Xiaomi App Store. WPSOfficePC adopts the same operation and layout as a computer, and paired with tablet keyboard accessories, it can improve office efficiency. According to the previous evaluation experience of this site, WPSOfficePC is significantly more efficient when editing documents, forms, presentations and other files. Moreover, various functions that are inconvenient to use on mobile terminals, such as text layout, picture insertion,

Xiaomi Mi Pad 6 series launches PC-level WPS in full volume! Same layout and operation as computer Xiaomi Mi Pad 6 series launches PC-level WPS in full volume! Same layout and operation as computer Apr 25, 2024 pm 06:40 PM

According to news on April 25, today, Xiaomi Tablet officially announced that Xiaomi Tablet 6, Xiaomi Tablet 6 Pro, Xiaomi Tablet 6 Max 14, and Xiaomi Tablet 6 S Pro now fully support PC-level WPSOffice. It is understood that Xiaomi Mi Pad 6 and Mi Pad 6 Pro need to upgrade the system version to V816.0.4.0 and above before they can download WPSOffice from the Xiaomi App Store. WPSOfficePCforPad has the same operation and page layout as the computer version, and is officially said to "achieve high efficiency on the tablet that is comparable to the computer version of WPS." In addition, in Xiaomi ThePaper OS, Xiaomi has also brought a new multi-tasking system to the Xiaomi tablet. , the interaction is similar to PC window mode, officially called self-

3d rendering, computer configuration? What kind of computer is needed to design 3D rendering? 3d rendering, computer configuration? What kind of computer is needed to design 3D rendering? May 06, 2024 pm 06:25 PM

3d rendering, computer configuration? 1 Computer configuration is very important for 3D rendering, and sufficient hardware performance is required to ensure rendering effect and speed. 23D rendering requires a lot of calculations and image processing, so it requires high-performance CPU, graphics card and memory. 3 It is recommended to configure at least one computer with at least 6 cores and 12 threads CPU, more than 16GB of memory and a high-performance graphics card to meet the higher 3D rendering needs. At the same time, you also need to pay attention to the computer's heat dissipation and power supply configuration to ensure the stable operation of the computer. What kind of computer is needed to design 3D rendering? I am also a designer, so I will give you a set of configurations (I will use it again) CPU: amd960t with 6 cores (or 1090t directly overclocked) Memory: 1333

Detailed method of referencing Excel worksheet data in word documents Detailed method of referencing Excel worksheet data in word documents Apr 26, 2024 am 10:28 AM

Method 1: When the entire table comes from an Excel worksheet, first select the data area that needs to be referenced in the word document in the Excel worksheet and perform a copy operation. Then run Word and click the [Edit] → [Paste Special] menu command to open the [Paste Special] dialog box. Select the [Microsoft Office Excel Worksheet Object] option in the [Form] list and click the [OK] button. Excel data referenced in this way can be edited using Excel. Method 2: When the data in the word document comes from a cell in the Excel worksheet, you can first copy the cell in the Excel worksheet, and then copy it in the Word document

3D drawing computer configuration and assembly recommendations? 3D drawing computer configuration and assembly recommendations? May 04, 2024 am 09:34 AM

3D drawing computer configuration and assembly recommendations? If used for 3D renderings, the laptop configuration requirements are as follows: 1. Operating system: Windows 7 (64-bit is recommended) 2. Memory: at least 2GB (4GB and above are recommended) 3. Graphics card: 1G of video memory and above, bit width 256bit or above, the video memory type is DDR3 or above, it is recommended to use NVIDIA brand graphics card (it is recommended to use professional graphics cards certified by solidworks: such as: NVIDIA Quadro series, ATI FireGL series or Firepro series) 4. CPU: Intel dual-core high frequency 64bit, it is recommended to use i5 series or i7 series, it is recommended that the CPU frequency is higher than 2.8GHz, in the center

See all articles