| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 574 人关注过本帖
标题:探讨VB程序中改数据库的问题
只看楼主 加入收藏
yqbyvonne
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-9-24
收藏
 问题点数:0 回复次数:1 
探讨VB程序中改数据库的问题

我要交个VB程序

但我现在有ACCESS数据库的  要换成SQL数据库的!请问要改些什么啊?


初始化数据库文件路径
DataPath = App.Path + "\storage.mdb"
DataConnectString = "Provider=SQL Sever;Data Source=" + DataPath + ";Persist Security Info=False" + ";Jet OLEDB:Database password=prowind"

这些怎么改成是连接SQL数据库的啊? 已经有storage的SQL的数据库!!!!

还有API函数:

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Declare Function BackupData Lib "storage.dll" (ByVal filename As String, ByVal backname As String) As Long
Public Declare Function ResumeData Lib "storage.dll" (ByVal filename As String, ByVal backname As String) As Long
Public Declare Function GetBit Lib "storage.dll" (ByVal bit As Long, ByVal Index As Integer) As Integer
Public Declare Function GetBits Lib "storage.dll" (ByVal bit As String, ByVal l As Integer) As Long
Public Declare Function ShowHelp Lib "storage.dll" (ByVal hwnd As Long, ByVal chmname As String, ByVal htmlname As String) As Long
Public Declare Function AddWndMsg Lib "storage.dll" (ByVal hwnd As Long, ByVal msg As Long, ByVal procaddress As Long) As Long

Public Declare Function ClearPrintData Lib "FxPrint.dll" () As Integer
Public Declare Function SetPrintDataWidth Lib "FxPrint.dll" (ByVal width As Integer) As Integer
Public Declare Function AddPrintData Lib "FxPrint.dll" (ByVal data As String) As Integer
Public Declare Function ShowPrint Lib "FxPrint.dll" (ByVal title As String) As Integer
Public Declare Function SaveToFile Lib "FxPrint.dll" () As Integer

Public fMainForm As frmMain '主窗口句柄
Public DataPath As String '数据库路径
Public DataConnectString As String '数据库连接源字符串
Public UserName As String '用户名
Public UserPas As String '用户密码
Public Purview As Long '操作权限
Public 权限类别(16) As Integer '17种权限类别

这些改怎么改啊?

因为本人以前没学过VB 只学过C之类的 不会啊

哪位高手出手帮我啊!谢谢谢谢啊!

搜索更多相关主题的帖子: 数据库 探讨 
2006-09-24 12:48
qingxi
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2006-2-16
收藏
得分:0 
ConnectString="driver={sql server};server=服务器名;uid=用户名;pwd=密码;datebase=数据库名"
2006-09-24 14:38
快速回复:探讨VB程序中改数据库的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.045156 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved