I've got a production site that has been working for years with a SQL Server 2000 default instance on server named MDWDATA. TCP port 1433 and Named Pipes are enabled there. My goal is to get this web app working with a copy of the database upgraded to SQL Server 2008. I've installed SQL2008 with SP1 on a server called DEVMOJITO and teste...
I've created an XML file using the .Save() method of an ADODB recordset in the following manner.
dim res
dim objXML: Set objXML = Server.CreateObject("MSXML2.DOMDocument")
'This returns an ADODB recordset
set res = ExecuteReader("SELECT * from some_table)
With res
Call .Save(objXML, 1)
Call .Close()
End Wi...
I have an SQL database and want to connect to it using VBA in order to support some legacy functionality. I'm using an ADODB connection and need to know what my database DSN is. How can I find this?
I'm using SQL Server 2008, thanks! :D
...
Hi,
I've been working with a Legacy application which interacts with a database through ADODB, and most of the changes to records follow a fairly straightforward pattern of:
Create a Recordset from a query
Make various change to the recordset
call .Update on the recordset.
What I'm wondering is, with ADODB recordsets, is there anywa...
In the following AccessVBA code, I am trying to write a record to a memo field called "Recipient_Display":
oRec1.Fields("RECIPIENT_DISPLAY") = Left(sRecipientDisplayNames, Len(sRecipientDisplayNames) - 2)
When the string contains 2036 characters, the write completes. Above this number I get the following error:
Run-time error'-2147217...
Hi!
I'm trying to get a listing of all tables in an Access database using Matlab.
I'm so far using an actxobject and can successfull run queries against the database, but all methods I've read here have failed.
I consistently get the error message 'No read permission on MSysObjects'. The query runs fine within the Access-program, but ...
I was troubleshooting an issue on a customer's workstation and found that, to my surprise, adodb.dll was nowhere to be found on the customer's workstation.
Typically, I see the file in C:\Program Files\Microsoft.NET\Primary Interop Assemblies folder.
Is this file distributed with the .NET framework or not?
...
I used to use PEAR MDB2 and one of the things I loved was the autoExecute()
It really cut down on code.
But's it's a pain having to get MDB2 enabled on some hosted servers. I'd like to use either PDO or just include some class file.
It looks like adodb has autoExecute too
http://phplens.com/lens/adodb/docs-adodb.htm#autoexecute
Is th...
Hi,
I have a table with a primary key called 'id' and I am using ADODB and getting a ADORecordSet_mysql back. I need an array where the id is associated with a row in the result set, but ADODBRecordSet_mysql only seems to have a GetArray(int startingRow) method that returns an array indexed by startingRow (where the default is 0).
I ...
Hi, I was reading through our code base at my company and I saw something that seemed like it could be done better.
$dbRow = $dbh->Execute("SELECT * FROM database.table LIMIT 1");
$tableColumnCount = $dbRow->_numOfFields;
Is this the only way to get a column count using ADODB? It just seems silly to have to execute a query so you can...
I'm building a PHP application which has to interact with several structurally identical databases. I'd like to use a singleton factory to hand out connections to the databases and minimize the number of duplicate connections. I'd also like to wrap the database class with a few functions.
It would be extremely convenient if I could do a...
I'm making a simple interface that will allow a user to modify pieces of CSS and HTML which are stored in a Microsoft SQL database. This interface uses PHP5 and ADOdb.
For some reason this form will reject any input which contains one or more single quotes. This string, for example, is not allowed: "background-image:url('paper.gif');" ...
Hello,
I'm trying to convert a pdf to binary dato and saving it to my SQL database. When i just output the pdf (from binary) to the user, it works perfectly.
The field in my database for the binary data is image.
Here is what i'm doing atm:
Set oFileStream = Server.CreateObject("ADODB.Stream")
oFileStream.Open
oFileStream.Type = 1 'B...
Following this other question on how to make parametrized sql query on classic asp, I now ask how to debug it?
I can write in a CommandText with it, and execute, but I can't see which SQL command I'm actually trying to run. So is there a way to check ADODB.Command's output to SQL?
...
At my current job, the standard practice has been to use mysql_query() and friends directly. When constructing large queries, since our standard deployment is on MySQL, table names just get inserted and surrounded by backticks (partial, fake example):
$sql .= "from `$tablename`";
I'm trying to get away from MySQL-ism's, and as part o...
With rs
.AddNew ' create a new record
' add values to each field in the record
.Fields("datapath") = dpath
.Fields("analysistime") = atime
.Fields("reporttime") = rtime
.Fields("lastcalib") = lcalib
.Fields("analystname") = aname
.Fields("reportname") = rname
.Fields("batchstate") = bstate
.Fields(...
what is the difference in the way these work:
Sql = "INSERT INTO mytable (datapath, analysistime,reporttime, lastcalib,analystname,reportname,batchstate,instrument) " & _
"VALUES (dpath, atime, rtime,lcalib,aname,rname,bstate,instrument) SELECT SCOPE_IDENTITY()"
Set rs = cn.Execute
Set rs = rs.NextRecordset
and this:
With rs
...
Hello,
I am trying to retrieve an ADODB recordset from a function in MS-Access 2007 but get a very annoying error message thrown in my face saying: "Argument not optional (Error 449)".
I really can't figure out what I am doing wrong, please help!
Regards,
Stefan
FUNCTION:
Function Rs(sourceSQL As String) As ADODB.Recordset
' Creat...
I am trying to figure out how to use ADO and ADODB to get data and view it while also being able to determine the PK so that I can alter data.
My plan is to use ADODB to display some data to an end user in Excel, if the user wants to edit the data there will be a macro monitoring cell changes and then sending the change to the database....
I am writing code for a client of ours which is designed to read an image from a SQL Server database into a file in a caching directory.
The binary data is being truncated at 262144 bytes (256kb). The column is of type varbinary(max), and we are using the ADOdb for Php to access the database. What is the cause of the truncation, and h...