Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 22nd, 2004, 12:09 PM
bijanbijan bijanbijan is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 4 bijanbijan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Red face Recrdset

Hi every Body

I am trying to make a Program, I am using SQL Server as my Data Base and I am Using Microsoft Access in order to make my Forms and Reports.

Here is the question:

I want to use DAO Recordset in order to Enter some Data from a Form to a Table which is not related to my Form. I know how to this in Access, But Apparently it is a little different when I am using SQL Server. This is how I will do it in Access:

In VB Editor I go to Tools>References> and Chose the Microsoft DAO 3.6 Object Library.

Then I have created a command button on the Installer Form to Save the new record and then copy that information over to a History table with the InstallerID and InstallerName Fields already created. Is this correct?

Private Sub Save_Installer_Click()
On Error GoTo Err_Save_Installer_Click

Dim r2 As DAO.Recordset

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70


Set r2 = CurrentDb.OpenRecordsets("History")
r2.AddNew
r2("InstallerID") = Me.InstallerID
r2("InstallerName") = Me.InstallerName

r2.Update
r2.Close

Exit_Save_Installer_Click:
Exit Sub

Err_Save_Installer_Click:
MsgBox Err.Description
Resume Exit_Save_Installer_Click


It works in Access, But It Does not If I am using SQL Server as my Data Base, Could you tell me why?

I think it has to do of choosing the right Option in Tools>References.



Best Regards

Bijan


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > Recrdset


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT