adodb

Classic ASP ADODB with SQL Server Compact Edition 3.5 is not working in Command Parameters

Hi All, I'm new to SQL CE. I'm programming in Classic ASP, connecting the SQL CE using ADODB.Connection. I have created the table and trying to insert data from the ASP. I tried in 3 ways. The inline insert statement [e.g. INSERT INTO tblName(col1, col2) VALUES(1,2)] (WORKED) The parameterized insert statement [e.g. INSERT INTO tblNam...

In VBScript, how to convert a string value into an object like ADODB.Recordset as objects variable name?

As i mentioned in the title, i have a function that retrieves some string parameters. In the function i need a convertion a string to an object like ADODB.Recordset. I am using VBScript in ASP. Thank you My code looks like: Function calc(someString,anotherString) Set someString = Server.CreateObject("ADODB.recordset") 'Opening db ...

How to remove private fields from ADODB ActiveRecordSet

An ADODB ActiveRecordSet contains many fields like _table, _original, _where, etc, which are not usefull to the client interface. To save time and code I often send a JSON-encoded version of the ActiveRecordSet object. An ActiveRecordSet object may contain child tables which also contain those private fields. I cannot use array_walk_recu...

How do I display adodb data in Codeigniter in my view?

I have this code in my model in codeigniter: <?php class User_model extends Model { function User_model() { parent::Model(); } function get_data() { $pages = false; // Get the pages from the database using adodb if needed $this->adodb->connect(); $recordSet = $this->adodb->e...

What is difference in adodb and oledb?

What is the difference between adodb and oledb? What is the relation between these two? Where does ado.net stands in context of adodb and oledb? ...

Handling ADODB connections in classic ASP

Hi, I'm an ASP.NET C# guy who has to go back to classic ASP, and need some help with it. First, look at this two functions (I know in VBScript the comments are declared by ' and not by // but the syntax highlighter here messes up with '). First version: Function DoThing Dim Connection, Command, Recordset Set Connection = Ser...

ADOdb fetchRow function is returning both columns name value pair and index(0,1,..),value pair

it fetches like this Array ( [0] => ABC [NAME] => ABC [1] => 33 [AGE] => 33 [3] => M [GENDER] => M [4] => LA [CITY] => LA [5] => OH [STATE] => OH ) How to get either case like Array ( [0] => ABC [1] => 33 [2] => M [3] => LA [4] => OH ) or Array ( [NAME] => ABC [AGE] => 33 [GENDER] ...

Return recordset from function in classic ASP

Hi, I'm at a loss on how I can return a readable recordset from a function in classic ASP. This is what I came up with, but it's not working: Response.Clear Response.CharSet = "utf-8" Response.ContentType = "text/plain" Dim Count Set Count = Test Response.Write Count.Fields(0).Value Function Test Dim Query, Connection, Comman...

Query (SQL Server 2008 Express) works in SQL Server Management Studio but not in Delphi using ADODB

Hi, I have the following query: WITH cte AS ( SELECT windowId, frameIndx, elemIndx, comment, ROW_NUMBER() OVER (PARTITION BY frameIndx ORDER BY elemIndx DESC) AS rn FROM dbo.translations WHERE windowId = 1 AND frameIndx IN ( SELECT indx FROM...

Need advice to debug: SQL query to oracle using ADOdb taking way too long

I'm accessing a view table with 6 million lines from a oracle database using the ADOdb for PHP library. running the following SQL query from a web server in a SUSE machine takes about 1 min: $adodb_handle->Execute("SELECT COUNT(BEPROTEXT) FROM (SELECT BEPROTEXT FROM V_E_LOG WHERE BEPROTEXT LIKE '%jaya%' )"); running the same SQL...

ADOdb Active Record Relation on a different database

Using ADOdb Active Record's One-to-Many relations, can I set a relation which use another database? Using "manual relations", I can load them whitout problem since each Model has it's own database prefix. ...

In VBA, how do I use ADODB to query the same file on a hard drive at the same time?

I have some VBA code that looks like this and the aim is to query a csv file and bring back some records. However, I want to be able to query the same file (which sits on a network drive) at the same time from two computers. I tried using the readOnly mode but it still doesn't work. Please help? Dim cnt_string As String cnt_strin...

VBscript - SQL Connection fails SQL Server does not exist or access denied

Hi, this is pretty strange. I've got this string that connect to a SQLServer in the same domain as the computers are running and compares username with employeeID. Then takes that row and dumps it into the lokal computers registry. This is working in Windows XP, but not Windows 7 it seems. I get this exact error message: Line:39 Char:...

LDAP + ASP Classic + ADODB = 2147217865. (Using LDAP to talk to Active Directory in ASP Classic. Error:2147217865)

I need to use LDAP to authenticate users for an old ASP website. I have been using the code found here. It looks like this: <%@ LANGUAGE=VBSCRIPT %> <%Option Explicit%> <% Function getADUserInfo(strUID) on error resume next strGeneralLookupError = false strBase = "<LDAP://DC=[DOMAIN], DC=[DOMAIN EXETENTION]>" strFilte...

Converting a php array to SQL array

Hey, I want something like the following: $arrayOfValues = array(1,2,3,4); $sqlArray = mysql_convertToSqlArray($arrayOfValues); which then will return what in SQL would be: (1,2,3,4) but in php would be the string "(1,2,3,4)" ...

How do I upload a zip file via HTTP post using VBA?

This question has been asked many times by others in some form or another but most remained unanswered or the given answer is "Use C#, duh!", which incidentally, is a non-answer. ;-) I want to upload a zip file to a web server via VBA. The server side code already exists and works well; it accepts zip files via manual form upload and do...

VBScript Converting XML Data to an ADODB RecordSet

I have a situation in which I need to dump XML into an ADODB Recordset in VBScript. My XML is in the form below. What I would like to do in my code is convert the XML into a recordset with AddressObject rows. The code below I tried but keep running into one DomDocument error after another. Can anyone please help me with a solution for th...

Import hashtable's fields in a adodb recordset

Hi have a hashtable and an adodb.recordset. The field's names of hashtable are same of fields adodb.recordset How can i import the fields value of hashtable in fields adodb.recordset without do it manually? ex Dim Tot As ADODB.Recordset Dim h As Hashtable = New Hashtable h("a") = 1 h("b") = 2 h("d") = 4 the recordset tot has fields...

Help passing XML String to RecordSet

What I would like to do is dump an XML String into RecordSet. The problem I am having is that the code seems to work fine if I saved the XML String first to a file and then read from the file which I think is redundant. However, when I want to read from string, I get the error RecordSet cannot be created. Source XML is incomplete or in...

provider cannot be found error in python connecting to SQL Server

I'm attempting to connect to a SQL Server database within a Python script. I'm using SQLNCLI as provider on my connection string. from win32com.client import Dispatch connection_string = "Provider=SQLNCLI;server=%s;initial catalog=%s;user id=%s;password=%s"%(server,db_name,user,pwd) dbConn = Dispatch("ADODB.Connection") dbConn.Open( ...