Results 1 to 3 of 3


  1. #1
    Join Date
    Dec 1969

    Default ODBC VS. OLE DB

    Can someone please help to run this using OLE DB. I am new to this Data connection. Please Help SLOWDBC is killing me!!!<BR>How do I convert this to run OLE DB.... THANK YOU GODS!!!<BR>We don&#039t have an SQL Server Yet. I am using .MDB<BR><BR>&#060;BODY bgcolor="#ffffff" leftmargin=0 topmargin=0&#062;<BR>&#060;%<BR>Param = Request.QueryString("Param")<BR>Data = Request.QueryString("Data")<BR>%&#062;<BR>&#060;%< BR>Session.timeout = 15<BR>If IsObject(Session("GasControl_conn")) Then<BR>Set conn = Session("GasControl_conn")<BR>Else<BR>Set conn = Server.CreateObject("ADODB.Connection")<BR>conn.op en "GasControl","",""<BR>Set Session("GasControl_conn") = conn<BR>End If<BR>%&#062;<BR>&#060;%<BR>sql = "SELECT * FROM [DB011]"<BR>If cstr(Param) &#060;&#062; "" And cstr(Data) &#060;&#062; "" Then<BR>sql = sql & " WHERE [" & cstr(Param) & "] = " & cstr(Data)<BR>End If<BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR>rs.Open sql, conn, 3, 3<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: ODBC VS. OLE DB

    Hello,<BR><BR>It is quite simple. Change the line:<BR> conn.open "GasControl","",""<BR>with something like this:<BR> conn.open "PROVIDER=Microsoft.Jet.OLEDB.3.51; DATA SOURCE=C:pathfile.mdb;"<BR><BR>If you have MDAC 2.1 you can change the 3.51 with 4.0 in the connection string.<BR><BR>Check out the articles:<BR>http://www.4guysfromrolla.com/webtech/063099-1.shtml<BR>http://support.microsoft.com/support/kb/articles/q193/3/32.asp<BR><BR>Regards,<BR><BR>Carlos<BR>

  3. #3
    John Cunningham Guest

    Default RE: ODBC VS. OLE DB

    I&#039ve just spent the last day converting all my ODBC to OLEDB and it seems well worth it .. speed is visibly improved (SQL7 and Access97) and all seems stable. I think you are best to get the latest MDAC (2.1 SP2) from www.microsoft.com/data and use that with the JET 4 4.0 driver. <BR>Be aware though that from the moment you install the MDAC all your current connections OLEDB and ODBC will probably fail until you recreate the connection strings. <BR>Once the MDAC is installed you can make connection strings by using the the right mouse menu on the desktop and selecting NEW/NEW Microsoft data link .. fill in the wizard and then when the UDL file is saved open it in notepad and copy the connect string it makes to paste into your code. I think this may only work on NT boxes as the UDL is UNICODE .. the &#039 95 notepad ain&#039t that clever. I found the UDL files really useful for dealing with the on standard connections - passwords etc...<BR><BR>Go for it OLEDB is the way to go<BR><BR>John Cunningham<BR>http://www.wlonline.org.uk

Posting Permissions

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