SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    Russia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to use "adovbs.inc" in ASP.NET

    I have included "adovbs.inc" file in my .aspx file:
    Code:
    <!-- #INCLUDE FILE="adovbs.inc" //-->
    But I get the following error:

    Code:
    Compiler Error Message: BC30451: The name 'adUseClient' is not declared.
    
    Source Error:
    
     
    
    Line 48: 	rs = Server.CreateObject("ADODB.Recordset")
    Line 49: 	rs.PageSize = intPageSize
    Line 50: 	rs.CursorLocation = adUseClient
    Line 51: 	rs.cursortype=adopenstatic
    Line 52: 	Conn = DBconn
     
    
    Source File: C:\WebServers\Gazeta\default.aspx    Line: 50
    Where am I wrong?
    Thank you
    Regards,
    Alexander Saprykin
    http://www16.brinkster.com/saprykin

  2. #2
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Without meaning to offend... you'd probably be best off having a thorough read through sites like www.asp.net www.gotdotnet.com www.dotnetjunkies.com and the sample applications on www.ibuyspy.com - from the three questions you've asked on this page, I'm guessing you're just starting ASP.NET? It's massively different to ASP, so it really is a good idea to read through all the tutorials, samples and explanations you can. I only say this because the questions you're asking show that you haven't understood some of the fundamentals of ASP.NET - how the thing works, basically.

    Please don't take that as a flame, I just think you'll have more success if you read up on the subject first - of course I'm not saying "don't ask questions" or even "don't ask basic questions", I just think you'll gain more from studying some of those sites first .

    To answer your question - you don't need to use adovbs.inc in ASP.NET, and database interaction is also handled completely differently (the RecordSet object no longer exists for example) - so none of the code will work in an ASP.NET page
    Nick Wilson [ - email - ]

  3. #3
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just another thought that struck me - are you actually trying to write ASP.NET pages, or get classic ASP pages to work on a server running the .NET beta? Plain old ASP files will work without modification, but you don't need to change the file extension to .aspx - just leave your classic ASP pages as whatever.asp and they ought to work on a server running the .NET framework.

    I don't know if that is the case or not, just a thought that occured when I saw that your code was all written the "old way" (i.e. in ASP 3.0)
    Nick Wilson [ - email - ]

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2001
    Location
    Russia
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello, CrazyCrane !!!

    Thanks for your advises.
    I currently have a plane ASP application, and now
    I want to convert it to ASP.NET.
    Because it would be executed more quickly.(I think)

    I'm already reading tutorials from
    http://samples.gotdotnet.com/quickstart/aspplus/


    Regards,
    Alexander Saprykin
    http://www16.brinkster.com/saprykin

  5. #5
    SitePoint Addict
    Join Date
    Jun 2001
    Location
    Newcastle, England
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah right I see - well good luck with it! You're right that most applications will execute faster written in ASP.NET if used properly - there are loads of ways .NET applications can be optimised. It'll probably be a big job to change over, possibly even a complete rewrite, but it'll teach you a lot at the same time.

    Hope you enjoy learning anyway - it's a big change from classic ASP but worthwhile I think. And fun .
    Nick Wilson [ - email - ]


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •