Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi guys

can anyone change this code to sqlConnection?
VB
Dim Db As ADODB.Connection
Dim rs As ADODB.Recordset

Set Db = New ADODB.Connection
Db.ConnectionString = GetConnectString & AppPath & "schedule.mdb"
Call Db.Open
Set rs = New ADODB.Recordset
Set rs = Db.Execute("select * from tbl_Schedule where StartDate = #1/1/2002#")

While Not rs.EOF
Call Me.Schedule1.ScheduleItems.Add("", #1/1/2002#, rs!StartTime, _ 
rs!Length, rs!Description, "")
Call rs.MoveNext
Wend


Thanks in advance
Posted
Comments
[no name] 6-Jul-13 13:09pm    
"can anyone change this code to sqlConnection?", yes anyone can including you.
jomachi 6-Jul-13 13:22pm    
I'm sorry my friend but I can't. Can you help?
[no name] 6-Jul-13 13:47pm    
Why can't you? Do you not have a keyboard? I could help you if you had a specific problem but unfortunately you do not have a problem at all and I am not a code translation service.
jomachi 6-Jul-13 13:53pm    
Ok I will change recordset with sqldatareader. The problem is with
Call rs.MoveNext
Sergey Alexandrovich Kryukov 6-Jul-13 13:21pm    
ThePhantomUpvoter won't get a notification on your comment. If you wanted to be heard, you should have commented on his comment (could you see "Reply" above?), not you own post.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900