Remote Access Through ADODB
Nov 8, 2005
Hi everyone, I'm just a newbie in DB programming and I'm having a trouble:
I have a database located in my IIS server: "c:inetpubwwwrootwebapplication1dbs1.mdb".
I'm also developing a VB6 app in another computer which will access to my IIS server to get data in my database. I'm using ADODB, but I don't know how to establish the connection as well as to get the data from the server (remote machine).
Can anyone in here help me by showing an example in VB6 code?
Thank you very much, any sugestion is welcome
Reply With Quote
View Replies
ADVERTISEMENT
Nov 24, 2013
I opened a 2007 Access db in Access 2010. This DB worked perfectly in Access 2007, but when I opened it in 2010 my recordset.recordcount no longer works.
This is what I have:
rsGetInst was previously defined
Dim intInstCount as integer
Dim rsGetInst As New ADODB.Recordset
rsGetInst.CursorLocation = adUseClient
rsGetInst.CursorType = adOpenDynamic
rsGetInst.LockType = adLockOptimistic
rsGetInst.open "Select * from tblInstruction where CustID = " & intCustomerID
intInstCount = rsGetInst.recordcount
At this point a get a "type Mismatch" error, and it is happening in all my recordsets recordcount.
Is there a command or reference that needs to be change when using Access 2010. When I compared the references the only difference is that in 2007 we reference Microsoft Access 12.0 Object Library and in 2010 is Microsoft Access 14.0 Object Library.
View 1 Replies
View Related
May 18, 2005
We have an Access Database split between front and back-end. The BE is 50Mb and the front about 60Mb. We have a requirement to provide access to the database to our other branches all of which have broadband.
I have been trying to find out the best way to achieve this over IP as we do not want the considerabe expense of leased lines. Originally we tried VPN but access seems to be very slow and appears to prohibit that route.
We were advised by our PC support company for one branch to use Terminal Services. However we do not currently have a powerful enough server to support these. We have a price for a server upgrade and it seems OK. I have since been advised by the PC support company at another branch that because of the upload speed on broadband (256Kb) Terminal Services would not be sufficient especially if we were using HTTP and VoIP over the same connection.
Looking at the various posts on this site it would seem that VPN and TS are suitable for some. Is there an easy way of calculating whether or not TS will work at our site? Has anyone gone down this route and found it not to work?
I'd be grateful for any feedback.
Thanks.
View 2 Replies
View Related
Oct 4, 2006
I have a database on a server that is accessed by mobile clients using laptops (broadband)
when out of the office. They use'virtual private network service' to do this.
(I did not set this up, I just design and program the front and back ends)
However some report a slow response time when retieving data from the database file.
Would 'Active desktop' be any quicker?
Any suggestions on how they might speed things up, would be most welcome
'Replication' comes to mind but I think their data must remain up to date at all times.
View 3 Replies
View Related
Sep 23, 2005
I have an Access database on my server. My client does not like the idea of having to download the db, make changes, then upload it back. In the past, he has dealt with SQL databases, where you can create an access data project, that will give you a desktop shortcut straight to the database. I was wondering if there was any way to do something similar with an Access database. There is FTP setup for the site and all required permissions are setup. Is there any way to create a desktop shortcut, so he can edit the database in real-time, without having to download and upload? Thanks for any help.
View 3 Replies
View Related
Jul 29, 2007
I have developed an application for a friend. We live about 100 miles apart in the UK. The database (Access 2007) works perfectly for us, I input data from various sources and he views the reports I've designed that show him exactly what he wants to see.
Now I want to move to the next phase which is I enter data from my PC at home and he then views the reports on his PC at his home.
Any advice on how I can do this, at low cost,
View 2 Replies
View Related
Feb 20, 2008
Hi,
I am doing some computer work for a company that has an Access 2000 application. This app is split up between a program database that contains the forms, reports, etc. and a data database. Both the program database and the data database are located on a Windows 2003 teminal server. There are usually two or three remote users logged into the terminal server, but this number is about to increase to 6 or 7. I am concerned that these user's will all be running the same copy of the program database. I have read that this can lead to performance problems.
I was wondering if anyone hear thought either of the following would be an improvement:
1. Put a separate copy of the program database in each user's profile on the terminal server.
2. Rather than keeping the program database on the terminal server, put a copy of it on each of the remote client pc's. Then set up a VPN connection to the server and use this to link to the data database.
If anyone could tell me if either of these options would lead to improved performance, I would really appreciate it.
Thanks in advance,
Paul
View 2 Replies
View Related
Apr 10, 2007
HiI currently have an Access Database in a BE/FE, server/client LAN architecture at a single office location. My client would like to allow one user to 'add new records' to the database on the weekends (i.e. after hours), without needing to come into the office.From my research, it seems I can setup Remote Desktop to connect from the client's home PC directly to the server PC, across the internet, using Windows XP Professional on both computers. Is it that simple, or should I be considering other things?
View 5 Replies
View Related
Jun 10, 2007
Good evening,
my web site (in hosting) stores data in a SQL Server database.
Now, I've and import these data in an Access application and, of course, I've no direct access to SQL Server instance.
I thought about using Web Services. Does anybody know how to do, or has an alternate way?
View 1 Replies
View Related
Jul 15, 2015
I have a database on a remote computer that has several reports that can be generated. Is there anyway to create a PDF of one of those reports and download it to my main computer?
View 4 Replies
View Related
Jan 28, 2007
Hi,
I am finishing an Access database for a customer that may want, in a later stage, to have a website(probably ASP) that would connect on the same database. Is that possible? I mean can an Access project on a pc connect to remote database(mdb or SQL server) used by the website?
If so can you give me some quick steps to do so or a good article on it?
Thanks.
View 6 Replies
View Related
Aug 4, 2013
I've just split a database into the front-end and back end components. But how to distribute it further.
Additionally, I need people who have the front end to access the database from their homes, not just from work.
What would I need to use?
Is there anything available for free?
View 3 Replies
View Related
Jun 4, 2007
I am making a database to coordinate the activities of my band (how rock and roll!)...
Is there a way I can somehow host the file remotely, and have users (4 total) access that file through their own computer using access, so they can write, edit, delete records?
We have a db at my work that we use like this, accessing from multiple computers, though this is on a network drive.
View 2 Replies
View Related
Feb 28, 2005
The company I work for remains on the 2.6 version of the various MDAC components. Unfortunately, upgrading is not an option that I can control. So....
When I open a recordset which DOES contain records, I often return a RecordCount of -1. EOF is false, so that is working, and I am able to use that to get around part of my problem. Where I need the count after iterating through the recordset, I am able to use an iCounter variable to get that. I have tried using MoveLast, MoveFirst, etc. before calling for RecordCount, but that does not help.
In many instances having the count BEFORE going through the recordset would be very helpful. Has anyone else ever encountered this problem? Anyone devise a workaround?
Thanks in advance for any help!
John
View 3 Replies
View Related
Aug 14, 2006
I am trying to set up an unbound form inn access 2003 to link to a PostgreSQL database. Being a newbie to this sort of stuff, I am having a few problems. Using Access 2003 VBA Programmers Guide, I have found some code to help in what I am trying to do but I cannot get my head around the connection settings.
The code under the form General Declarations is:
Code:Dim rsTest As ADODB.RecordsetDim cnTest As ADODB.ConnectionDim boolAddNewMode As BooleanPrivate Sub pPopulateFields()' Check to be sure the recordset is not in a BOF or EOF state.' If it is then do nothingIf Not rsTest.BOF And Not rsTest.EOF Then' rsTest.Resync adAffectCurrentMe.job_number = rsTest.Fields("job_number")Me.customer_ref = rsTest.Fields("customer_ref")Me.pen_contract = rsTest.Fields("pen_contract")End If' Set focus to the Exit controlMe.cmdExit.SetFocus' Reset the text boxes and save/cancel buttons to a' locked or disabled state.Me.job_number.Locked = TrueMe.customer_ref.Locked = TrueMe.pen_contract.Locked = TrueMe.cmdCancel.Enabled = FalseMe.cmdSave.Enabled = False' Reset the boolAddNewMode flagboolAddNewMode = FalseEnd SubCode under on Open event of form:Private Sub Form_Open(Cancel As Integer)' For simplicity, we will use the built-in connection of the ADP.' If we were creating an MDB or connecting to a different SQL Server,' then the full connection string would need to be suppliedSet cnTest = Server.CreateObject("ADODB.Connection")cnTest.Open "FILEDSN=PostgreSQL"' Create the recordset and move to the first recordSet rsTest = New ADODB.RecordsetrsTest.Open "Digi Ticket", cnTest, adOpenDynamic, adLockOptimisticrsTest.MoveFirst' Populate the text boxes on the form with datapPopulateFieldsEnd Sub
I want to the form to pickup data using a filedsn called PostgreSQL from a table called 'public_digipen_tickets' and populate a form called Digi Ticket.
Can anyone offer any assistance.
thanks in advance.
View 4 Replies
View Related
Oct 25, 2004
Hello,
I am new to asp so if anyone would be kind enough to help me i would appreciate it.
I am using macromedia dreamweaver to connect to an access database
This is the error i am getting
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. /results.asp, line 47
this is my code
Code: <<A href="mailto:%@LANGUAGE="JAVASCRIPT">%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%><!--#include file="Connections/IDX.asp" --><%var MLSIDX__twn = "everett";if (String(Request('twn')) != "undefined" && String(Request('twn')) != "") { MLSIDX__twn = String(Request('twn'));}%><%var MLSIDX__type = "sf";if (String(Request('type')) != "undefined" && String(Request('type')) != "") { MLSIDX__type = String(Request('type'));}%><%var MLSIDX__beds = "1";if (String(Request('beds')) != "undefined" && String(Request('beds')) != "") { MLSIDX__beds = String(Request('beds'));}%><%var MLSIDX__baths = "1";if (String(Request('baths')) != "undefined" && String(Request('baths')) != "") { MLSIDX__baths = String(Request('baths'));}%><%var MLSIDX__min = "0";if (String(Request('min')) != "undefined" && String(Request('min')) != "") { MLSIDX__min = String(Request('min'));}%><%var MLSIDX__max = "999999999";if (String(Request('max')) != "undefined" && String(Request('max')) != "") { MLSIDX__max = String(Request('max'));}%><%var MLSIDX = Server.CreateObject("ADODB.Recordset");MLSIDX.ActiveConnection = MM_IDX_STRING;MLSIDX.Source = "SELECT * FROM mls WHERE LONG ='"+ MLSIDX__twn.replace(/'/g, "''") + "' AND PROP_TYPE ='"+ MLSIDX__type.replace(/'/g, "''") + "' AND NO_BEDROOMS >= '"+ MLSIDX__beds.replace(/'/g, "''") + "' AND NO_FULL_BATHS >= '"+ MLSIDX__baths.replace(/'/g, "''") + "' AND LIST_PRICE BETWEEN '"+ MLSIDX__min.replace(/'/g, "''") + "' AND '"+ MLSIDX__max.replace(/'/g, "''") + "' ORDER BY LIST_PRICE";MLSIDX.CursorType = 0;MLSIDX.CursorLocation = 2;MLSIDX.LockType = 1;MLSIDX.Open();var MLSIDX_numRows = 0;%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Untitled Document</title></head><body><%=(MLSIDX.Fields.Item("LIST_PRICE").Value)%><%=(MLSIDX.Fields.Item("LIST_PRICE").Value)%><%=(MLSIDX.Fields.Item("LAST_NAME").Value)%></body></html><%MLSIDX.Close();%>
any suggestions as to what i am doing wrong?
View 1 Replies
View Related
Apr 29, 2015
I try to use collection of a ADODB.recordset eg rsTarget,Essentially I want to assign the fields (columns) in this rsTarget with respective data. I tried to use of
two sets. (fld as adodb.field)
Set fld = rsTarget.Fields.Item(count)
Set fld = rsTarget.Fields.Item(Column(count))
Then I try to use following to assign
RsTarget!fld.name = Data1
It failed stating that there is no fld.name. Using column set, it state that there is no column function. How to do it right?
View 2 Replies
View Related
Jul 2, 2013
I'm building a lab environment into one of my projects. I'm testing the distribution of values over a largish number of attempts to create a unique value.I have a table called LAB_UniqueIDTest, with two fields:
LAB_ID - the string value being tested, and
LAB_UsageCount - the number of times the value has been created.
I'm trying to open the table using the following code:
Code:
' Initialize access to the LAB_UniqueIDTest table
Set rs = New ADODB.Recordset
rs.Open "LAB_UniqueIDTest", _
CurrentProject.Connection, _
adOpenKeyset, adLockOptimistic
I have similar snippets of code all over the application - either with a literal (as here) or as a string parameter.I do not, ever, use the options parameter of rs.open.I get error message "Run time error -2147217900 (80040e14) Invalid SQL statement - expected DELETE, INSERT, PROCEDURE, SELECT or UPDATE
My guess is it's because somehow the Open procedure is trying to interpret the tablename as a SQL statement. But how come it isn't this obtuse at other times?
View 6 Replies
View Related
Feb 8, 2007
I want to use the NOT IN operator for the filter method of ADODB.recordset in VBA. Do anybody in the forum know the syntax.
View 3 Replies
View Related
Sep 2, 2005
ADODB.Recordset (0x800A0BCD)
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
Code:
<%
function combomaker(elSQL, elFieldNameID, elFieldName, elSelected, elConn)
' This function creates a generic combo box with values from a table
dim elRS
set elRS = server.CreateObject("ADODB.Recordset")
set elRS = elConn.Execute(elSQL)
elRS.MoveFirst
do while not elRS.eof
response.Write "<option value='" & elRS.fields(elFieldNameID) & "'"
if elSelected <> "" then
if cstr(elRS.Fields(elFieldNameID)) = elSelected then
response.Write " selected "
end if
else
if elRS.BOF then
response.Write " selected "
end if
end if
response.Write ">" & elRS.fields(elFieldName) & "</option>" & vbCrLf
elRS.MoveNext
loop
elRS.close
set elRS = nothing
end function
%>
View 1 Replies
View Related
Jan 16, 2013
I have windows 7 and office 2003 installed.
I have access application which was running fine recently but for some reason everytime I run it now it gives an error on the adodb connection string saying compile error.
Its doing this on every adodb connection I have in my database.
I have tried registering the dao an ado dlls but still the problem persists.
View 3 Replies
View Related
Jul 3, 2011
I have a routine which connects to MySQL database with ADODB connection. This worked in 2003 and 2007 runtime but throws a 430 error on 2010 runtime. It works in full access 2010. Has there been a change of policy to restrict this type of connection in the 2010 runtime? If I use a linked ODBC table instead of ADODB the runtime fails with "Runtime Error". It still works in full access.
View 2 Replies
View Related
Oct 16, 2013
I have a form that shows records from ADODB recordset.When I try to apply filter to the underlying recordset it works all right but the form doesn't reflect the changes. It shows same rows as before filtering. In debug I can see that the recordset contains only filtered records. Me.Refresh (Recalc, Requery) doesn't work.
Code is as follows:
Dim rs As New ADODB.Recordset
rs.Open sql, conn, adOpenStatic, adLockOptimistic
Set Me.Recordset = rs
Sub combo_AfterUpdate()
Me.Recordset.Filter = "CompanyNo = 123"
End Sub
The form is in Continuous forms mode. I cant use DAO because the data comes from SQL server user-defined function.
View 5 Replies
View Related
Jun 9, 2014
I am getting the error " Unrecognized Database Format Error.
Sub ShowUserConnected()
Dim cn As New ADODB.Connection
Dim cn2 As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim i, j As Long
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
[Code] ....
View 5 Replies
View Related
Sep 4, 2013
I can't make edits with ADODB recordset bound to my form.
Access 2010 linking to SQL Server 2008.
Simple form bound to a single table.
Connection string works fine.
Code is as below (cursor etc is set using enums btw).
Private Sub Form_Open(Cancel As Integer)
Dim rst As ADODB.Recordset
If g1OpenRecordset(rst, "tblName", rrOpenKeyset, rrLockOptimistic, False) = False Then
Cancel = True
Exit Sub
[Code] ...
View 3 Replies
View Related
Jul 11, 2006
I've been looking around and it seems to be impossible to connect to an mdb file on an ftp (for Access 2002 and below). I'm using Access 2003 so does anyone know if it's possible in this version?
View 3 Replies
View Related