Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 2nd, 2006, 05:39 AM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connect SQL Server 2000 with VB6

Hi there,

I have a VB6 program connected to Access 97. I migrated access 97 into SQL server 2000 and i am now in the process of linking SQL server 2000 database with VB6. I used the connection string and it seems to be working.

My problem is VB6 code uses opentable method to open access 97 tables. This has been used in many times in the code and i need to know how i can use the same code to SQL server 2000.
For example, at present it uses

Set MyTable1 = MyDb.OpenTable("client") for Access 97. How can i do the same for SQL server 2000?

I am very new to SQL server and i really appriciate u r help!

Thank you very much...


Reply With Quote
  #2 (permalink)  
Old May 8th, 2006, 02:01 PM
Authorized User
 
Join Date: May 2006
Location: Bangalore, , India.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to manudutt
Default

you need a lot of changes .. if you want to open a table and then use it you can use (in ADODB connection) -
Code:
Dim rec_item As New adodb.Recordset
...
rec_item.open ("SELECT * FROM item_main "), _
 connect, adOpenDynamic, adLockOptimistic
here connect is ADOBB connection.

if you want to update , delete any thing from table you can directly use SQL queries for that ,like
Code:
db.Execute "UPDATE item_main SET item_quan = item_quan   _
+ " & added_item & " WHERE item_no = " & cur_ino
you can ,however, use -
Code:
recordsetname.Add
recordsetname.Update
if you are using recordset ..
(NOTE : _ (underscore) is used to change line in VB)


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CAN NOT CONNECT TO SQL SERVER 2000 REMOTELY charlietritran SQL Server 2000 9 December 22nd, 2006 04:14 PM
Connect to SQL server 2000 from home! Jane SQL Server 2000 5 June 7th, 2006 03:42 PM
Connect SQL Server 2000 table with VB6 sanjna000 Access 1 May 2nd, 2006 06:28 AM
Access 2000 "Connect to SQL Server" cjdphlx Access VBA 1 July 17th, 2005 02:09 AM
SQL Server connect to VB6 okinokiyo SQL Server 2000 3 June 7th, 2004 11:30 AM



All times are GMT -4. The time now is 05:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.