provider=SQLOLEDB doesn't seem to work with ADO

provider=SQLOLEDB doesn't seem to work with ADO

Post by Les Caud » Sun, 18 Oct 1998 04:00:00



I can cpen a connection with
        cnn1.open
"driver={SQLServer};server=SERVERNAME;uid=sa;pwd=xxx;database=xxDb"

but I can't seem to open it if I specify "provider=SQLOLEDB" instead
of the driver={SQL Server};

The latest edition of the Hitchhiker's Guide to Visual Basic and SQL
Server suggerst using this to use the OLE DB provider for SQL Server
when using ADO.

How can I get this to work?
--

 
 
 

provider=SQLOLEDB doesn't seem to work with ADO

Post by Les Caud » Sun, 18 Oct 1998 04:00:00


Fixed by using the new keywords in my connnection string:

Data Source instead of server
User Id instead of uid
Password instead of password
initial catalog instead of database

Quote:>I can cpen a connection with
>    cnn1.open
>"driver={SQLServer};server=SERVERNAME;uid=sa;pwd=xxx;database=xxDb"

>but I can't seem to open it if I specify "provider=SQLOLEDB" instead
>of the driver={SQL Server};

>The latest edition of the Hitchhiker's Guide to Visual Basic and SQL
>Server suggerst using this to use the OLE DB provider for SQL Server
>when using ADO.

>How can I get this to work?


 
 
 

1. AddNew with ADO Recordset doesn't seem to work

Hi,
Can Anyone help me?  I seem to have been going round in Circles for days!!

I'm Trying to use an ADO Recordset with no Recordsource to Hold Data in an
ASP page (Which will later hold the data for the session).  Specifically,
this data is comming from an Index Server Recordset, which I iterate through
and add certain records into the new recordset.  However, When I try to
display the contents of the recordset, all the added data is blank!  Any
Ideas?  The code is below.

Thanks

<html>
<head>

    <TITLE>Search Form</TITLE>

</head>
<body>
<%
' *********  Subs used to fill Category1 and Category2 Recordsets *********

Set Q = Server.CreateObject("Ixsso.Query")

Q.DefineColumn "Category1 (DBTYPE_WSTR) =
d5cdd505-2e9c-101b-9397-08002b2cf9ae documenttype"

'Q.Columns = "Category1, Category2"
Q.Columns = "Category1, Path"
'Q.SortBy = "Category1[a],Category2[a]"
Q.SortBy = "Category1[a]"
Q.MaxRecords = 300
Set RSCat1 = Q.CreateRecordset("nonsequential")

Set rst = Server.CreateObject("ADODB.Recordset")
rst.fields.Append "Category1", adChar, 100
rst.fields.refresh
rst.Open

RSCat1.MoveFirst
Cat1 = RSCat1("Category1").value
RSCat1.MoveNext

rst.AddNew "Category1",Cstr(Cat1)
rst.Fields("Category1").Value = Cstr(Cat1)
rst.update
%> **<%response.write(Cat1)%>**<BR><%
%>**<% response.write(rst.Fields("Category1").Value) %>**<BR><%

do until RSCat1.Eof
 if Cat1 = RSCat1("Category1").value then
  RSCat1.MoveNext
 else
  if not RSCat1("Category1").value = "" then
  Cat1 = RSCat1("Category1").value
  %> **<%response.write(Cat1)%>**<BR><%
  rst.AddNew
  rst.Fields("Category1").Value = Cat1
  rst.update
 %>**<% response.write(rst.Fields("Category1").Value) %>**<BR><%
  end if
  RSCat1.MoveNext
 end if
loop

%><BR><BR><BR><%
rst.MoveFirst
do until rst.Eof
 if rst.Fields("Category1").Value = "" then
 %>Blank<BR><%
 else
 %>**<% response.write(rst.Fields("Category1").Value) %>**<BR><%
 end if
 rst.MoveNext
loop
rst.Close

%>
</body>

2. Problem with "Dim as Field"

3. Select @vchMyVar = Null doesn't seem to work in ADO

4. how can i trim the space in server side

5. Testing for valid records doesn't (seem to) work in XP

6. How to setup MSDE for connection with Interdev

7. Round function doesn't seem to work on floats

8. Control Center Missing!!!!

9. IDENTITY_VAL_LOCAL() doesn't seem to work under Linux (SuSE 8-0) db2 V7.1

10. My Access SQL Doesn't seem to work

11. Urgent - NOT FOR REPLICATION doesn't seem to work

12. DBMS_OLAP RECOMMEND DOESN'T SEEM TO WORK.

13. Dblist doesn't seem to work correct