I need to modify someone else's VB code, and I don't have much experience with VB6.
I need to call a SQL2000 stored procedure using ADODB. One of the parameters is of type Binary and it's giving me problems. Every time I create the parameter, I get an error "Application uses a value of the wrong type for the current operation". The error...
I have an excel sheet I need to import in my Access database.
The sheet looks like this:
DATE RECEPTION DENOMINATION ITEM N° QUANTITE RECUE
06/01/2010 DVD-Sex ...
I am using adodb for PHP library.
For fetching the id at which the record is inserted I use this function "$db->Insert_ID()"
I want to know if there are multiple and simultaneous inserts into the database table, will this method return me the correct inserted id for each record inserted ?
The reason I am asking this is because I use t...
I'm trying to use PHPUnit to test some ADODB based classes and I'm not having much luck. What I'm seeing is that is the test of the ADODB based class is not the first test it fails claiming that "Undefined index: MyTable".
I created the simplest possible test case. I have
A table with one column, an autoincrementing int
An ADODB der...
My application is using ADODB to connect simultaneously to 2 MySQL DB. Application is downloading large files; it takes a lot of time so "mysql has gone away" error takes place.
I know that MySQL allows to use automatic reconnection which could be enabled using mysql_options(), but I have no clue how to apply this function to ADODB adap...
Hi!
In past i use adodb for mysql in php. Now i wont to use PDO. How can i quick switch from adodb query to pdo using one connection to datebase?
...
I have the following code to insert items into a MySQL database from an Excel form.
Set rs = New ADODB.Recordset
ConnectDB
With wsWorkBook
strSQL = "INSERT INTO work_order (job_status, job_description, system_id) VALUES ....;"
rs.Open strSQL, oConn, adOpenDynamic, adLockOptimistic
' word_order.id
End With
How can I get the...
Hi to all,
I am executing multiple vb6 components that accesses different database engines such as access (mdb), sql server, etc from within asp.net.
These components are already compiled dlls in vb6 and added as referenced assembly in asp.net framework 2.0. Each component has several functions that passes the adodb.connection object a...
Hello all,
I am making use of Adodb and I wish to get the field names of a result set. How do I do this?
$result = &$db->Execute($query);
The above query has executed successfully, I just don't know how to get the field names from that one row and loop through it.
I am making use of an access database,
I couldn't find anything in t...
Hi,
I am converting an old application to use SQL Compact database (it works ok with SQ Server 2005 and 2008) and using the following code gives an error when attempting to execute a simple select command:
Private Const mSqlProvider As String = "Provider=Microsoft.SQLSERVER.CE.OLEDB.3.5;"
Private Const mSqlHost ...
I am trying to get some old VB6 code to work with SQL Server Compact.
I can connect, open the database and all seems well. I can run insert select commands which work.
However the ADODB.Recordset RecordCount property always returns -1 even though I can access the Fields and see the data. Changing the CursorLocation = adUseClient ...
I couldn't find a proper documentation on how to call a stored procedure using ADODB in PHP. Can someone help please?
This is what I have now and I feel it's a dirty approach (or not?):
$stmt = "CALL LocFillData('foo', 'bar', @nullcount, @totalcount)";
$rsstmt = "SELECT @nullcount, @totalcount";
$rs = $db->Execute($stmt);
$rsstmt = $db...
I am using Adodb and Postgresql. When I insert a row, it increments the ID field using SERIAL.
Is it possible to return the newly created ID number right after the insert?
...
I am new to SQL, and have two tables that hold data(I am using Adodb). They both have keys that connect them together, so I wanted to select a name from the first table if that has a parent id in the second table. I am using:
$db->GetCol("SELECT x_ast.name FROM x_ast, x_ast_tree WHERE x_ast_tree.parent='$parent_id'");
This returns a...
I have a Stored proc which returns 6 select statement results.
I'm trying to use one record set to execute sp and get records for each select statement
but i get 0 or empty records when i read them,
How can i query record set with
multiple select statements from
stored procedure?
ex:
Set rs = Server.CreateObject("ADODB.Recor...
Hello
I fail to execute an SQL query with a with clause via ADODB and Oracle.
That is, the following snippet works:
Dim cn As ADODB.connection
Set cn = ....
Dim rs As ADODB.recordSet
Set rs = New ADODB.Recordset
rs.Open "select 'foo' x from dual", cn
Do While Not rs.eof
...
rs.MoveNext
Loop
However, the following doesn't w...
I'm currently trying to run a certain procedure (sql 2005) in VB6, passing some parameters:
Dim conn As Connection
Set conn = New Connection
conn.Open "Provider=whateverprovider;Data Source=whateversource;Database=whateverdatabase;User Id=whateverID;Password=whatever"
Dim CMD As ADODB.Command
Dim rs As ADODB.Recordset
Set CMD = New ADOD...
I'm trying to execute a SQL statement using the ADODB PHP library against mySQL4.1 :
$rs = $db->execute("set @name = ?; select @name", array('test'));
but it does not seem to like this.
Is it possible to use variables with prepared statements?
...
I am using adodb with php. I need to insert html into my database, and need to know the best method to escape the quotes before inserting it into the database? I tried using pg_escape_string() but it still does not seem to insert.
What is the best method to do this?
...
I was told to use bind parameters so that I could insert text into my db that had quotes in it. But, I am pretty confused when it comes to how to do this, the commands seem confusing to me.
So, if I had a php string, that contained html, how would I insert this into my DB using bind parameters?
I wanted to INSERT it, how would I do th...