o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Checking for NULL ADODB.Connection (RESOLVED) -

Hello everybody

I have this problem. When a form of my application is closed, it eventually closes the ADODB.Connection to the MySQL database. Unfortunately, on some occasions the reference might not have been set due to an error of some kind.

How can I check to see if an ADODB.Connection references a valid object?

thx, in advance

George Papadopoulos

 

Checking for NULL ADODB.Connection (RESOLVED) -
Hello everybody I have this problem. When a form of my application is closed, it eventually closes the ADODB.Connection to the MySQL database. Unfortunately, on some occasions the reference might not have been set due to an error of some kind. How can I check to see if an ADODB.


Multiple Selects(resolved) -
If I am populating many different controls all with different tables within the same database do I need to have multiple rs and cn statements ie. Private adoRS As ADODB.Recordset Private cn As ADODB.Connection Private adoRS2 As ADODB.Recordset Private cn2 As ADODB.Connectio


ADO Recordset object usage (RESOLVED) -
Hello everybody I am trying to use the ADO Recordset object to enter a new record in a table. I have used code as shown below : Dim rsTexnikos As ADODB.Recordset Set rsTexnikos = New ADODB.Recordset rsTexnikos.ActiveConnection = connbio_tech rsTexnikos.AddNew rsTexnikos.Fie


Is the Connection closed -
Question??? How do I check to see if 1 or the other connection to a database are closed or not? Dim cnnDVD As New ADODB.Connection Dim rstDVD As New ADODB.Recordset Dim rstDVDCheck As New ADODB.Recordset Dim strSQLDVD As String


Accessing date field in vb causes exception (0x80020009) -
I am trying to acess oracle data and transfer it to access. I am checking date field and if not NULL then I try to generate sqlupdate string, but I get exception (0x80020009). I don't know how to fix this in vb. can someone help? Here is the code: set AccDb=server.CreateObject(&quo


[resolved] where clause -
Hello all. This is my first try at a WHERE clause with PHP. What I need is the syntax for retrieving the correct record and printing it on the page. Any help is appreciated. Many thanks. Code: if (!$conn = new COM("ADODB.Connection")) exit("Unable to create an AD


checking recordset for null in VB -
I am having some trouble checking a recordset column for NULL in Visual Basic The column which is null is called APOD2 The stored procedure which returns null is called sp_ATCtoPOD The stored procedure exists on my sql server and is a member of a dataenvironment Currently my c


[2005] adodb.connection is no more -
Error 1 'Connection' is ambiguous in the namespace 'ADODB'. dim conn as new adodb.connection conn = new adodb.connection what am i doing wrong here? how do i make a conenction like this and also how do i do it for a recordset? dim rs as new recordset is what i us


Connection to Database with Password *resolved* -
Hi, I'm new to VB... and need to connect to an Access database file. I've found these codes in another thread here: Dim objDB as ADODB.Connection Set objDB = New ADODB.Connection objDB.Open "provider=microsoft.jet.oledb.4.0;data source=<Path to your database file>


Can't Figure Out Connection String -
Hello, I have a ODBC Data Source for a SQL Server. The text connection was good. I am trying to connect with my VB application to the database with ADODB. I get a "Operation is not allowed when object is closed message". Basically, my connection is not open and methods fai


An ADO Error -
Dear friends, Part of my program is as follows: Public Function FindLastDate() As Variant ' Access the chosen stock market database using ADO ' Automatically show the last date in the chosen database ' Database Connection Dim conn As ADODB.Connection


help. textbox checking table code (RESOLVED) -
Hello I have 1 table from MSacces2000 contain field "code". and there are records in the "code" field. I open form(in vb6) with a textbox for checking code in table. I use adodc to connect to table, the code is: ---------------------------------- Option E


max() function in vb /access -
Dear Friends, i am unable to finger out that what is prob with my code this is my code Code: Private Sub btn_New_Click() 'Call OpenDB Call OpenDB Set rs = CreateObject("ADODB.Recordset") Set objcmd = CreateObject("ADODB.Comm


check for null-string *resolved* -
Code: if not DTR("pro_weight").value is null Txtweight.text = DTR("pro_weight") end if error is -> BC30822: 'null' is not declared. 'Null' constant is no longer supported; use 'System.DBNull' instead. i'm used to programming in vb, and i don't thi


Resolved - SQL and VB -
Still having problems with getting my SQL code to look up the employee number and give me the employee name. My problem now is that when i try to get the text box to fill i get an error message that says: "Invalid Use of Property" here's the code i'm using intSupv


**RESOLVED** Comparing NULL and zero -
I thot NULL was a distinct value different from zero? When I compare two variables to see if they are different (checking to see if the current value has changed from what was in the field originally) one is null and one is zero and they are being seen as equal. Is there a way to g


ADO update confused! -
How can I just move thought a recordset and update records which meet my criteria, it updates the whole file. This is what I am doing. Dim cn1 As ADODB.Connection Dim rs1 As ADODB.Recordset Set cn1 = New ADODB.Connection cn1.ConnectionString = "Provider=MSDASQL.1;


How 2 Convert Null Values 2 Not Null -
hi all i m facing a problem while connecting to my database (access 97- trying to convert to access 2000). i m using ADO CODE to connect to the database. the problem is that during the open recordset method it reads the NULL values and gives an error. pls tell me how to convert this


ADODB.Connection Issue -
hi everyone ... i use adodb.connection and sql db i connect to my db through adodb connection. then i activate my application role with: adoCon.execute "sp_setapprole 'myrole', 'myrolepwd'" first time i open the connection its work fine. then i close the connec


ADO: Parameters.Refresh causes connection pooling to fail -
Hi, I've managed to enable connection pooling by following this article. It works nice, except when I execute Parameters.Refresh on my ADO.Command objects. A trace using SQL Server Profiler clearly reveals that Parameters.Refresh causes ADO to enstablish a new connection: Quote:


whats wrong with it .. -
Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset Dim hold As String cnn.Provider = "MSDASQL" cnn.ConnectionString = "DSN=Visual FoxPro Tables;UID=;SourceDB=d:\PaybyPhone\01062501.dbf;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Coll ate=Machine;Nu


Regarding ADODB connection -
I'm using ADODB connection object in Visual basic to access data from SQL server. Should i close the connection while ending the application? or will the connection automatically closes when closing the application? Thanks for any help. Regards Sujatha.


ADODB Connection takes forever (RESOLVED) -
Hello everybody I have been building this VB 6 database application for some time. It uses MySQL as a back end (storage) and VB 6 as a front end. The connection to the MySQL database is done using ADO. Everything was working nice & fast till yesterday. For no apparent reason a


Type ADODB.Connection is not defined -
Hi all. Im a Delphi programmer by trade but I recently got a copy of Visual Studio 2005 so I could write some applications for PDAs. Anyway, Im trying to connect to a MS SQL Server with ADO, and all the help Ive read tells me to do something like this : Public Class Form1 Di


Slow ADO/ODBC to Oracle -
Hi, I have VB6 code here to access Oracle 8i with ADO/ODBC. I found the performance is very bad. If I run the same query from SQLPlus, it only takes a few seconds. But with the program it take a few minutes. The bottle neck is the statement of checking rstSource.EOF. I am using Micros


Insert NULL into DB[*Resolved*] -
I want to insert a NULL in my SQL Server database but it doesn't work. I've tried an empty string ('') and <NULL> and NULL. Anybody knows how the column is an int.


*RESOLVED* Checking the state of a ado connection -
I am getting an error when I try to set the active connection property of a command to an existing connection, err msg is "object already in collection". But if I pause the code before the line executes and chk the connection property it appears to be "= Nothing".


Best way to organize ADO objects in my program -
I have a VB6 program with about 25 forms that manipulates data in an ACCESS database via ADO. Originally I had the bright idea to establish a data connection ONCE using a global ADODB.Connection object variable, and then create, open, and close ADODB.Recordsets in each form as requ


passing connection to usercontrol *Resolved* -
hi all, I m creating a user control and i need to pass an adodb connection object to that control. Now i need to set that at designtime. is it possible and if yes how shud i do that?


Populating Forms -
Hi, Can anyone help me with this problem? I am populating a form from a SQL Server database. Some of the columns from the database are NULL and I need to show all the info from the database. The form can then be updated. (NULL values may be written back. Problem is when I'm


VB -->ADODB-->Access -
I have all my fields populted. On to the next part. How do I move around from record to record? This is what I have so far for the record connection. Private cn As ADODB.Connection Private rs As ADODB.Recordset Private Sub Form_Load() Set cn = New ADODB.Con


checking NULL in SQL and replacing it with zero in VB6 -
Hi, I need to check NULL in SQL and replace it with zero.My database is in MS Access. Access has a function NZ which does this job when you are in Access. but when used in SQL in VB6 and run it gives error, it doesn't recognize function.There is another function ISNULL but it just c


Help if connection error pls(RESOLVED) -
Hi, I have problem with code like this: vb code: _______________________________________________________________ Option Explicit Dim objConnection As ADODB.Connection Dim objRS As ADODB.Recordset Set objConnection = New ADODB.Connection objConnection.ConnectionString = &q


VB 6 - Re: ADO and DAO -
Good morning people, and happy new year to you all. I just need a brief clarification on the usage of ADO and DAO objects. Before I start coding, I usually import my "object references" by going to the Menu bar, and select "Project", then "references"


ADO _VB Null checking -
Hi, I am manipulating an access database thru ADO in VB. I want to check whether a paricular field of a table allows null value. Is it possible? How to do it?? Dennis


Checking network connection problem! -
If i pull out the network cable, checking for internet connection through a network still gives me an active connection message. How do i let it detect that it's been disconnected? i need to solve this problem fast.


Declare Connection Once for All -
I notice that i have to use these codes below very often. I would like to declare Once in the Module and call from other forms. Dim adoConnection As ADODB.Connection Dim adoRecordset As ADODB.Recordset Dim ConnectString As String 'Create a new Connection Set adoConnection =


Error Sending SQL Command -
I have a SQL Command. This command will change. But the one i am testing with is this. Select Distinct c1.Accountno, c1.Company, c1.contact, c1.Phone1 From Contact1 as c1 Inner join Contact2 as c2 On c1.accountno = c2.accountno And c1.U_STATE = 'CA' AND (c1.U_STATE <> 'ON' O


New adodb.connection -
Hello everybody, could anyone tell me the difference between Set Rs = new adodb.connection or Set Rs = adodb.connection Thanks Bjorn


Transaction Processing -
Hi Everyone, I just need some information about Transactions in VB 6.0, so here we go. Sub Test1() Dim connA as ADODB.Connection Set connA = New ADODB.Connection connA.BeginTrans .... Code Here ..... Call Test2 'If no problems then Commit connA.CommiTrans '