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

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 connection its also work fine.
then i open the connection again and its give me an error
then i close the connection its work fine.
then i try to open the connection again and its work fine.

ps: considered i already check the connection state before i open and close the connection

the conclusion is every second try to open the connection it always fail.
can anyone here help me

thanks in advanced.

regards,
Ferry

 

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


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


extremely anoying database path issue -
If anyone can please shed some light on this it would be greatly appreciated. firstly i have done everything i can imagine to locate the root cause of my issue but still ended up here. my application calls an adodb connection to an access database. my application is very large an


ActiveX dll Class & ADODB Connection problem -
Howdy, I'm developing an ActiveX dll and having some major problems I want my dll to have basically house functionality to create some reports from a database to a disk file. I have made a class for each report but am having trouble with the database connection in the class object.


[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


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


Anyone who are expert in data reporting -
I have some issue here regarding data report. I have no problem previewing the report before printing it out. My issue here is after previewing the report I saw some mistakes and I would like to go back to my form to make some changes...and when I click the preview button again... I ha


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


Updating records with ADO -
How can I update a record in a FoxPro table using ADO? So that all other users in the network can see latest changes? Is there a way to find out if a record been changed (after loading the recordset) before issue an "Update"? This is my coding to connect to this dbf


Time Issue -
Hi There. I am having an issue of time when connecting to an access database with vb.net. I open the DB, select the RS and then populate a list view with the records from the RS. This whole proccess takes about 10 seconds. When I used to do this from VB 6 it took less the 1 sec


Record updates using ADO -
How can I update a record in a FoxPro table using ADO? So that all other users in the network can see latest changes? Is there a way to find out if a record been changed (after loading the recordset) before issue an "Update"? This is my coding to connect to this dbf


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.


command strings - best meyhods -
Hi, Can someone give me a definitive set of rules as regards what is the best strategy when using ADO. i.e. Do I use: 1. Connection strings to execute 2. command strings to execute. 3. Recordset object to execute. I presumed the first two were relevant for doing things that


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


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


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


Data Refresh Issue -
Hi I have an issue that data is not being refreshed in ComboBox. Scenario: 1. SQL is my database 2. Using ADODB.Recordset 3. I defined connection at module level 4. There is a form to maintain Item Codes, which is working fine. 5. There is another form which is maintaining P


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 =


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 '


"Simple" problem with ADO -
I'm working on making the connection between VB and and access database using ADO. For some reason, everytime I run the program, I get a compile error right from the start on the declaration of the ADODB.Connection, ADODB.Command, or ADODB.Recordset. Dim objConn As ADODB.Command D


connection got error -
im using ms access as my database, adodb connection.. the error is : is not a valid path? here is the code. [code] public cn as new adodb.connection public sub connection() set cn = new adodb.connection cn.connectionstring = "Provider = Microsoft.Jet.OLEDB.4.0;Data


.ldb file not getting deleted after closing the adodb.connection -
Hi, We open a database connection with MS-Access using ADODB.Connection, and even after closing the database connection, the .ldb file is not getting deleted. What will be problem? Even we have checked the state property of the Adodb.connection. It is showing 0. We are using F


Urgent issue with speed -
Hi, I have a serious problem with the speed of a system. It is using MS Access as it's data store .... I know - bad move, but it's designed and is being used by the client for the last nearly 12 months. They (the client) have the application & databse installed on the server


DSN-less connection to ORACLE -
DSN-less connection to ORACLE? can anyone tell me the connection string i should use to connect to a oracle database using the ADODB.Connection of VB? ADODB.Connection.open ???? thanks


Connect to SQL database using code -
I have search the board but can't really find anything that explains how to connect to sql database using code. I used to use access and this is how I used to connect to that database I created a module and used this code. What would I do different for sql? Option Explicit Pub


closing ado -
ok this is very simple.. but i am new to asp stuff how do i close a record set?? i've created it by Set adoLink = Server.CreateObject("ADODB.Connection") set adoCmd = server.createobject("adodb.command") set adoData = server.createobject("adodb.re


Difference between Opendatabase & ADODB.Connection -
Hi Guys, i'm a bit lost here: what is the main diffrence between Dim Con as adodb.connection set con = new adodb.connection ... con.open Dim rs as adodb.recordset set rs = new adodb.recordset set rs.activeconnection = con ... rs.open when i do: rs.fields("xyz").


Object name remains lowercase -
When I create a new ADODB connection object in the IDE, the class name always displays as lower case in my code. For example Code displays as Dim oConn as ADODB.connection instead of Dim oConn as ADODB.Connection The code compiles and runs fine. What's going on?


ADODB.Connection array -
Is it possible to make ADODB.Connection array like this: Dim ConnArray() AS NEW ADODB.Connection ??


Use multiple datareader -
Hi all!!!!! In VB6.0 we use to write a code like this........... ////////////////////////////////////////////////////////////////////////// Dim con as adodb.connection Dim rs as adodb.recordset Dim rs1 as adodb.recordset set con=new adodb.connection with con .pr


different ways of connection -
Hi. Some ppl say you should conect to a DB using: dim db as database dim rs as recordset .....etc while others say: dim ADOcn as ADODB.connection dim ADOrs as ADODB.recorset If i get it right i think the 2nd way in ADO and the 1st one is DAO. Now: What are the difference


recordset.recordcount = -1 -
I am getting a recordset from a database, by running a stored procedure, using the adodb control (is that the right term) ie Dim sConnect sConnect = "Provider=SQLOLEDB.1;" & _ "Persist Security Info=False;" & _ &quo


time out error when saving to SQL database -
I keep getting random time out errors when saving to the SQL database. We have been running the same program for close to 2 years and have never had this problem. We have not changed any of the program. Here are some of the lines used to connect and save to the database. dim db


ADODB.Connection with SP problem -
Hi, I'm using ADODB to connect sql server. i created a connection. i run a stored procedure from connection object, it's not returning resultant recordset. The strored procedure will return recordset Can anyone clarify that?


need some help with a dbase Connection string in Module -
I tried to do this but I'm not sure how. Haven't worked with modules yet so... I made my connection work but when I try to put this in the module it doesn't read it and I get an error This is what I have in the form I am working with now: General Dec Dim cn As ADODB.Connection


Adodb References -
hello guys..... what is the suitable "references" to use ADODB? here my sample code: Option Explicit Public Cnn As ADODB.Connection Private Sub MDIForm_Load() Set Cnn = New ADODB.Connection Cnn.ConnectionTimeout = 30 Cnn.ConnectionString = "Provide


MDAC 2.6 Stream XML Recordset -
See below, when i try to open my string "XML", i got this error Run-time error '3709': The application requested an operation on an object with a reference to a closed or invalid Connection object. i'm on MDAC 2.6 I know there a bug report on Knowledge DB, but the solut


Opening Connection to Acces DB 97/2000 -
Hello World, Could anyone help me with a list of (all ?) possiblities of provider information to open a ADO connection to a access 97 and/or access2000 DB. what i mean exactly : Code: Dim cnn As ADODB.Connection Dim rs As ADODB.Recordset Set cnn = New ADODB.Connection