473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Transfer ADO Code to ADO.NET

HI,
how to do a RecordSet in OleDbConnection???
my original code is using ADODB.RecordSet
But how can i do the RecordSet in OleDbConnection?

my original code

Function openDB() As Object
objConn = New ADODB.Connection
objConn.Open(dbDNS) '("dbfile")

objRS = New ADODB.Recordset

End Function
Function closeDB() As Object
' If the RecordSet has a state of 1 (open) close it
If objRS.state = 1 Then
objRS.Close()
End If

objConn.Close()
objConn = Nothing
End Function

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 19 '05 #1
1 909
This is really a bad way to do database operations in ASP.Net. Interop is
problematic, and there are plenty of classes in the CLR for working with
databases. I would suggest using them.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"ronaldlee" <le***********@yahoo-dot-com.no-spam.invalid> wrote in message
news:41**********@Usenet.com...
HI,
how to do a RecordSet in OleDbConnection???
my original code is using ADODB.RecordSet
But how can i do the RecordSet in OleDbConnection?

my original code

Function openDB() As Object
objConn = New ADODB.Connection
objConn.Open(dbDNS) '("dbfile")

objRS = New ADODB.Recordset

End Function
Function closeDB() As Object
' If the RecordSet has a state of 1 (open) close it
If objRS.state = 1 Then
objRS.Close()
End If

objConn.Close()
objConn = Nothing
End Function

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: StephenMcC | last post by:
Hi All, Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web...
4
by: Drew | last post by:
I have a server.transfer question. I have a page that utilizes the server.transfer method. On the page that is transfered to - lets say page 2, I want to do another server.transfer. This gives...
5
by: Nedu N | last post by:
Hi All, I am facing a typical problem in my .NET application with the pop-up script messages. The thing is that its working fine when i run on my development machine but not running in expected...
9
by: Mark | last post by:
Hello I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop) The problem is that the...
11
by: Alexander Bosch | last post by:
Hi, I'm having a problem similar to the one that's stated in this KB http://support.microsoft.com/default.aspx?scid=kb;en-us;839521 When I'm posting a page to itself with the bool value as true it...
15
by: dee | last post by:
Hi, I'm curious why MS decided to have Transfer hide the target page's url invisible? Any guesses ? Thanks. Dee.
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
0
Frinavale
by: Frinavale | last post by:
Platform: WindowsXP and IIS Language: Asp .NET (using Visual Basic back end) I'm not sure if anyone will be able to understand my code because its written using ASPX and Visual Basic back end. ...
2
by: =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post by:
Hi, I'm using Threads, and when I try to do Server.Transfer, I recieved an error. (child object does not exist...) My Code: Dim t As New Thread(AddressOf Hilo) Private Sub Hilo()...
0
by: Pega | last post by:
Hi, im doing a college project, which is a banking app, it is more or less fully functioning, the user can log in and check their balance, but i have trouble setting up a transfer function, so the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.