scotthutchings
Registered User.
- Local time
- Yesterday, 20:10
- Joined
- Mar 26, 2010
- Messages
- 96
I have a fairly large database application with hundreds of lines of DAO code such as:
Will this code work once I upsize the backend to Microsoft SQL Server Express 2008 R2?
I am in the process of trying to figure out how to upsize my database application. I have migrated the data using the Move Data menu option to SQL Server but as soon as I ran my first code, I got Error #91 (Database Object not set). This code worked great before the switch. I really don't understand how I convert my Access FE/BE database to an Access FE/Microsoft SQL BE application. I finally got Microsoft SQL Server installed on the Windows 2003 Server and have been able to connect to it, but I am stuck here. Can anyone point me in the right direction?
Thanks!
Scott
Code:
Dim rs As Recordset
Dim rs1 As Recordset
Dim SQL As String
Dim OldValue As Variant
Dim NewValue As Variant
Project = Forms![Update Value]![ProjectName]
OldValue = Forms![Update Value]!OldReference
NewValue = Forms![Update Value]!ValueToUpdate
Set db = CurrentDb
Select Case (Me.CallingFieldName)
Case "BidProposalReference"
Set rs = db.OpenRecordset("SELECT * FROM [Bid - Proposal] " & _
"WHERE ProjectName = """ & Project & """ AND " & _
"ProposalReference = """ & OldValue & """")
If Not rs.BOF Then
rs.Edit
rs!ProposalReference = NewValue
rs.Update
rs.Close
Set rs = Nothing
End If
I am in the process of trying to figure out how to upsize my database application. I have migrated the data using the Move Data menu option to SQL Server but as soon as I ran my first code, I got Error #91 (Database Object not set). This code worked great before the switch. I really don't understand how I convert my Access FE/BE database to an Access FE/Microsoft SQL BE application. I finally got Microsoft SQL Server installed on the Windows 2003 Server and have been able to connect to it, but I am stuck here. Can anyone point me in the right direction?
Thanks!
Scott