473,468 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Multiple-step OLE DB operation generated errors

2 New Member
Hi all,
First time poster here so bear with me!
Apologies if this has been asked before but I haven't come across a solution yet...

I have a very simple java script code (not complete), just to test connection to an SQL server:

Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="JavaScript"%>
  2. <HTML>
  3. <BODY>
  4. <%
  5.  
  6. var myConnect = "Provider=SQLOLEDB;Data Source=testserver;Initial Catalog=testDB;Integrated Security=yes";
  7.  
  8. var ConnectObj = new ActiveXObject("ADODB.Connection");
  9.  
  10. var RS = new ActiveXObject("ADODB.Recordset");
  11.  
  12. var sql = "SELECT value FROM tblMain;"; 
  13.  
  14. ConnectObj.Open (myConnect);
  15.  
  16. RS.Open(sql,ConnectObj,adOpenForwardOnly,adLockReadOnly,adCmdText);
  17.  
  18. Response.Write(RS("value"));
  19.  
  20. RS.Close();
  21.  
  22. ConnectObj.Close();
  23.  
  24. RS = null;
  25.  
  26. ConnectObj = null;
  27. %>
  28. </BODY>
  29. </HTML>
Which gives me the following error every time I execute it:

Expand|Select|Wrap|Line Numbers
  1. Error Type:
  2. Provider (0x80040E21)
  3. Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
  4. /Dta/test.asp, line 14
I have followed a few websites instructions but am no further to solving this problem. The database table in question does contain data with the right type of data, and I've checked out the registry 'fix' which was recommended and this already existed anyway within my registry.

Any help would be greatfully appreciated! Thanks in advance
Jun 25 '10 #1
1 2703
russ22
2 New Member
@russ22
Update:
I've tried to create the phrase to connect to the database with a UDL file.
This results in the following:

Expand|Select|Wrap|Line Numbers
  1. Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=testDB;Data Source=testServer
I read somewhere that Persist Secutiy Info is bad to declare, but in my original version I didn't do this.

More confusion for a weekend incoming ! hehe :(
Jun 25 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
6
by: Rolf Wester | last post by:
Hi, I have a form with a select element with multiple="true". When using the GET method (I suppose the same happens with the POST method) I can seen that the form sends channels=CH1&channels=CH2...
6
by: x. zhang | last post by:
Hi Guys, We know that we can use <input type=file ...> to upload one file per time to the server. My question is if there are some way to upload multiple files per time to the server. (Of...
5
by: Morgan Cheng | last post by:
It seems no pattern defined by GoF takes advantage of multiple inheritance. I am wondering if there is a situation where multiple inheritance is a necessary solution. When coding in C++, should...
6
by: Ben Hallert | last post by:
Hi guys, I'm trying to figure out what bone headed mistake I made on something I put together. I've got a form (named 'context') that has a variable number of select-multiple inputs on it. ...
22
by: Matthew Louden | last post by:
I want to know why C# doesnt support multiple inheritance? But why we can inherit multiple interfaces instead? I know this is the rule, but I dont understand why. Can anyone give me some concrete...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.