PC Review


Reply
Thread Tools Rate Thread

ADP and SQL Express

 
 
Steven Cheng
Guest
Posts: n/a
 
      24th Mar 2009
I just recently i migrated on my Access database to SQL Express 2005 and
trying to connect to the databases with the following:

Private Sub testing()
Dim strconnect As String
Dim r As String

Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset

strconnect = "Provider=SQLOLEDB;Integrated Security=SSPI;Initial
Catalog=Telephone;Data Source=PH-XP01\SQLEXPRESS"

Set cn = New ADODB.Connection
cn.ConnectionString = strconnect
cn.Open
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = cn
.Source = "Select * from Accsum_30987_20080304"
.Open
.MoveLast
MsgBox .RecordCount, vbOKOnly
End With


End Sub

i keep getting an error message upon trying to execute the movelast
statement where the error message reads:
Row set does not support fetching backward.

can someone please explain where i have gone wrong here as i was able to
retrieve the field names from the table, but can move through the table like
i had with DAO.

Steven
 
Reply With Quote
 
 
 
Reply

Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
pci-express 6pin or dongle pci express 12volt rail for single 1950xtx xtera ATI Video Cards 0 10th Dec 2006 04:54 AM
Confusion: VB Express/VC Express/Sql Server Express Edition Patrice Microsoft Dot NET 3 18th Jan 2006 01:21 PM
Confusion: VB Express/VC Express/Sql Server Express Edition Patrice Microsoft C# .NET 3 18th Jan 2006 01:21 PM
Confusion: VB Express/VC Express/Sql Server Express Edition Patrice Microsoft VB .NET 3 18th Jan 2006 01:21 PM
Importing Outlok Express Address Book in to Microsoft Outlook Express dskaushik Microsoft Outlook Contacts 1 4th Nov 2003 01:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:08 AM.