Connection String For Access Database On A Network Using Ip Address
i would like to connect to an access database across a lan using the ip address of the server on which the database resides on the server as the connections string. some thing like this
data source=xxx.xxx.xxx.xxxmyfoldermydatabase.mdb
i don't seem to know how to do it right!
can any one help me?
thanks in advance
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Connection String? With Access Database
I was just trying my project on the school netwrok running win 98 and the below isnt open so my program is usless is their any other connection string, I have seen some around. I THINK.
Trying to connect to Access Database
ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data " & _
Access Database Connection String
OK, since I have always used SQL Server for multi tiered projects I have never run into this problem before...
I have an application which is 3 tiers...
Client.EXE <--> BusinessObjects.DLL <--> DataObjects.DLL <--> Access.MDB
Since all my projects were in the same directory I very stupidly had the location of the database, in the DataObjects tier, as App.Path & "" & "MyDatabase.mdb"
When packaged I failed to realise that te data tier DLL was placed in System32...D'oh! And the database was placed in the Client.EXE directory...Bad Woka *SLAP*
Anyways, so I have to change my code in the Data Tier DLL so that it looks in the EXE directory for the database...but how do I find that out since the DLL has no idea which directory the user installed the application into
I am assuming the way to do it would to be query the registry and find the applications path? Since this is a slow process, relative to other VB functions, I would want to cache this...I am also assuming that if I change my Data Tier to an ActiveX EXE, then once I have the directory I can cache it in a global varible in a common module of the Data Tier so ALL threads of the ActiveX EXE can see the global vaible...?
Anyone?
Why can't the school buy SQL Server!!! Much simpler...
Woka
:Connection String Of Password Protected Access Database
Hi what will be the connection string if i put a password to my access database?
I used this connection string:
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "payroll.mdb;
Persist Security Info=False;"
But after i put a security in my access database, i got an error whenever i login.
Run-time error '-2147217843 (80040e-4d)':
Not a valid password.
How do i fix this, please help..
Edited by - milenyume on 1/24/2006 6:21:46 PM
Pivot Cache Connection String In Current Access Database
I created a WORKING Access database which created workbooks with multiple worksheets and pivot tables using ANOTHER Access database as the datasource. The working code is commented out below. As I said, it worked fine with that code I wanted it all to be in one db. Then I moved everything into the current database and tried to change the connection string accordingly. At this point I received this error:
"ODBC Microsoft Access Driver Login Failed"
"The database has been placed in a state by user 'Admin' on machine 'xxxxx' that prevents it from being opened ore locked."
I am not surprised by this. I probably have the connection string overly complicated, but don't know how to word it now so that it will work with the current DB. My offending code is below. The commented out stuff is what used to work fine. The new is where I attempted to make it right, but it bombs out with the above error on the last statement highlighted in red. I have tried many variations, but it shouldn't be nearly as difficult to use one of the database tables as a dat source then some external one. I have looked everywhere for how to connect to my own database or even if I have to.
Code:
--------------------------------------------------------------------------------
On Error GoTo Except
Set PTcache = xlw.PivotCaches.Add(SourceType:=xlExternal)
' PTcache.Connection = Array(Array("ODBC;DSN=MS Access Database;DBQ=D:Users501599284My DocumentsEED Actuals Reports.mdb;DefaultDir=" & _
' "D:Users501599284My Documents;D"), Array("riverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;"))
PTcache.Connection = Array(Array("ODBC;DSN=MS Access Database;DBQ=" & CurrentDb.Name & ";DefaultDir=" & _
CurrentProject.Path & ";D"), Array("riverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;")) PTcache.CommandType = xlCmdSql'MUST use an Array function here if string is longer than 255 characters - Excel 2000 issue
'PTcache.CommandText = Array("SELECT GM_FW_Weekly.GeneralManager, GM_FW_Weekly.EmployeeType, GM_FW_Weekly.PandL, ", _
' "GM_FW_Weekly.Platform AS Category, GM_FW_Weekly.PlatformDetail AS Activity, GM_FW_Weekly.FunctionalManager, GM_FW_Weekly.ProgramType, GM_FW_Weekly.Pl", _
' "atformDetail, GM_FW_Weekly.SHOP_ORDER, GM_FW_Weekly.ACTIVITY_NUMBER, GM_FW_Weekly.EMPLOYEE_NAME, GM_FW_Weekly.FW, ", _
' "GM_FW_Weekly.HOUR_TYPE, GM_FW_Weekly.LaborRate, GM_FW_Weekly.Hours, ", _
' "GM_FW_Weekly.Plan, GM_FW_Weekly.PlanByFM, GM_FW_Weekly.Cost, GM_FW_Weekly.Function, GM_FW_Weekly.Heads" & Chr(13) & "" & Chr(10) & _
' "FROM `\Scgvls01psge
pis1-s2Weekly InfoDuaneEED Actuals Reports`.GM_FW_Weekly GM_FW_Weekly" & Chr(13) & "" & Chr(10) & "", _
' "WHERE GM_FW_Weekly.GeneralManager LIKE '" & GM & "' ", _
' "ORDER BY GM_FW_Weekly.GeneralManager, GM_FW_Weekly." & "", _
' "EmployeeType, GM_FW_Weekly.PandL, GM_FW_Weekly.Platform, GM_FW_Weekly.PlatformDetail, GM_FW_Weekly.FW")
PTcache.CommandText = Array("SELECT GM_FW_Weekly.GeneralManager, GM_FW_Weekly.EmployeeType, GM_FW_Weekly.PandL, ", _
"GM_FW_Weekly.Platform AS Category, GM_FW_Weekly.PlatformDetail AS Activity, GM_FW_Weekly.FunctionalManager, GM_FW_Weekly.ProgramType, GM_FW_Weekly.Pl", _
"atformDetail, GM_FW_Weekly.SHOP_ORDER, GM_FW_Weekly.ACTIVITY_NUMBER, GM_FW_Weekly.EMPLOYEE_NAME, GM_FW_Weekly.FW, ", _
"GM_FW_Weekly.HOUR_TYPE, GM_FW_Weekly.LaborRate, GM_FW_Weekly.Hours, ", _
"GM_FW_Weekly.Plan, GM_FW_Weekly.PlanByFM, GM_FW_Weekly.Cost, GM_FW_Weekly.Function, GM_FW_Weekly.Heads" & Chr(13) & "" & Chr(10) & _
"FROM GM_FW_Weekly GM_FW_Weekly" & Chr(13) & "" & Chr(10) & "", _
"WHERE GM_FW_Weekly.GeneralManager LIKE '" & GM & "' ", _
"ORDER BY GM_FW_Weekly.GeneralManager, GM_FW_Weekly." & "", _
"EmployeeType, GM_FW_Weekly.PandL, GM_FW_Weekly.Platform, GM_FW_Weekly.PlatformDetail, GM_FW_Weekly.FW")
Set pt = PTcache.CreatePivotTable(TableDestination:="", TableName:="GMPivot")
Will The Connection String Will Work For All The Network Users !
Option Explicit
Public Cnn As New ADODB.Connection
Code:Sub Main()
CPTSPath = App.Path & "EMPLOYEETS.mdb"
Cnn.Open "DSN=CPTS;Uid=Admin;Pwd=;"
frmChkLogin.Show
End Sub
I am using the above to connect to the database and the application resides in the server, will this connection string provides full access for the users in the Network or not.
Thankyou,
Chock.
Network Database Connection
In the client machine(Windows 98), I used ADODC to connect to a SQL Server 2000 database which is located at the server(Windows 2000 Advanced Server). I used the 'Microsoft OLE DB Provider for SQL Server' and in the connection tab, I typed in the server name and uses Windows NT Integrated security. When I try to select a database from the server, the list is EMPTY!!! An error message appeared
"[DBNMPNTW]ConnectionOpen(CreateFile())."
There is no problem accessing the database using ADODC while developing a VB app in the server machine.
Both the client and server is on the same workgroup network. I am new to LAN. Maybe there is some OS or SQL Server settings which I left out. Please Help.
Database Connection Via A Network
How to you connect to a database over a network.
exp.
Commondialog1 opens and the user types in a computer name and it connects to the shared database over a network.
Database Connection Over A Network?
How can i make my database connection over a network?
ie my application has two parts, both access the database( MS Access ) which is over the network.
I am using DAO object.
Now i am using Vb code as follows
Code:
Set db = OpenDatabase(App.path & "echoproj.mdb")
Database Connection On A Network
Hello,
I need a bit of help with connecting to an Access database on a small network from my VB program.
The code below is what i used to connect and disconnect to the database when it was on C drive of a stand alone computer, now the database is on a server (running Server 2000) on a network, i think the server is called drive F so is it just a case of replacing the C: in the connection string with F:
Any help would be appreciated.
Code: Set cn = New ADODB.Connection
cn.ConnectionString = "Provider =Microsoft.Jet.OLEDB.4.0;" & "DataSource = C:SKM_ICE DatabaseSKM_ICE DBase.mdb"
cn.Open
Set rsSearch = New ADODB.Recordset
rsSearch.Open "tbl_master", cn, adOpenKeyset, adLockPessimistic, adCmdTable
rsSearch.Close
cn.Close
Set rsSearch = Nothing
Set cn = Nothing
Winsock (or Network Database Connection)
i haven't use winsock before. i am developing a client-server based app with a database located in the server. the client need access to the server database. is winsock suitable for this task? If yes. how to implement this winsock? Thanks
Visual Basic Access Network Connection?
Hey people
I wasnt sure which to post this in, the database development or the Visual Basic 6 forum because it covers both grounds, if any admin decide its best in the database development one then please move it.
My application dictates that I will be accessing an Access database (2000) over a network. The database will be updated via my application, and other users on the network will be able to read / search from it. At present i am using the following connection method
VB Code:
Dim adoRecordset As New ADODB.Recordset adoRecordset .Open "[Data]", strConnectionString, adOpenForwardOnly, adLockReadOnly adoRecordset .CloseSet adoRecordset = nothing
The strConnectionString contains the provider, and location etc for the database. Whilst this method works fine i was wondering about the benefits of actually using an ADO connection object, and then setting this to the Connection object of the recordset, rather than passing it the connection string directly?
Furthermore, does anybody have any tips for concurrency / updating an Access database over a network.
Thanks
Gav
How To Check Network Connection Or Access To Other Server??
Hi,
I have a problem when trying to determine if some remote networkdirectories are available.
It's a file transporting system that moves files from one serverdir to another when they're available.
I check for files using the Dir command, i.e. if dir("\appl1filesdown*.*).
If the dir is empty there is no problem, however if the connection is temporary lost, I get a file/path error in the dir statement.
I'd like to give a message stating 'connection not available', but I can't capture the error so that I know what the problem is.
Anyone know how to check if '\appl1' is available?
I can't use drivemapping unfortunately.
Thanx,
Braniac.
Shared Access To An Access 2000 Database In A Network Directory
Hi!
My application (a VB executable) uses a Microsoft Access database to store various information entered by the user. The application and the database are located on the network so many users can access it simultaneously. Just recently, I implemented persistent connections so the database connection remains open for the entire life of the application (which speeds things up considerably compared to connecting every time something needs to be done). Since then, only one user seems to be able to connect at any single time. As far as I know, Access allows about 20-30 simultaneous user connections without a problem (and can do much more), so why does it lock the database exclusively? The application is loaded into the memory of every user's computer, so each user should use only their own connection object.
Here's the code I use to connect:
==================
Set m_DbConnection = New ADODB.Connection
With m_DbConnection
sDSN = "Provider=Microsoft.Jet.OLEDB.4.0;"
sDSN = sDSN & "Data Source=" & sDb & ";"
sDSN = sDSN & "Persist Security Info=True"
.ConnectionString = sDSN
.CommandTimeout = 8 'wait 8 secs before exiting commands
.ConnectionTimeout = 15
.CursorLocation = adUseClient
.IsolationLevel = 4096
.Mode = adModeShareDenyNone Or adModeReadWrite
.Open
End With
PROC_Exit:
Exit Function
PROC_Error:
If Err.Number = -2147467259 Then 'Cannot open database (either doesn't exist or locked)
Dim vErr As ADODB.Error
If Not (m_DbConnection Is Nothing) Then
If m_DbConnection.Errors.Count > 0 Then
For Each vErr In m_DbConnection.Errors
HandleError ERR_LOG_DETAIL_LONG Or ERR_TARGET_LOG, vErr.Number, vErr.Description & " (native error: " & vErr.NativeError & ")", vErr.Source, "basDb::PrepareConnection"
Next vErr
Else
HandleError ERR_LOG_DETAIL_LONG Or ERR_TARGET_LOG, Err.Number, Err.Description, Err.Source, "basDb::PrepareConnection"
End If
Else
HandleError ERR_LOG_DETAIL_LONG Or ERR_TARGET_LOG, Err.Number, Err.Description, Err.Source, "basDb::PrepareConnection"
End If
Else
DisplayDetailedError Err.Number, Err.Description, Err.Source, "basDb::PrepareConnection"
End If
Resume PROC_Exit
==============
If another user already connected to the db, I get this error:
Error #-2147467259: Unable to use ''; file is already in use. (native error: -67044352, minor error code: -1024, major error code: -1024, Jet IDA Number (DAO Error): 3045) [source Microsoft JET Database Engine, procedure basDb::PrepareConnection]
(the first error is an ADO error, the native error is what the data provider returns, and other things are just what I got after doing a few searches on MSDN).
I first thought that the problem is about the Mode property setting of the connection object, but MSDN describes adModeShareDenyNone constant as the less restrictive, full database sharing mode, and combining it with adModeReadWrite seems the most logical solution to allow others to read/write data. I even tried to remove it (leaving only adModeReadWrite), but the same thing took place.
I tried to change the CursorLocation property to adUseServer, but it had no effect.
I tried updating the version of MDAC to 2.6, but to no avail.
Have any of you had the same problem or knows the solution? I will appreciate any help I can get!
Thanks a lot in advance!
Stanislav
Connecting Access Database By A Relative Address, Please Help
I created my final year project in VB which links to Access database, by simply pointing to the database on my hard drive, from the properity of the DAO (data1).
My problem is I have to hand my project in 8 hours, on CD therefore when the application is run off the CD it tries to look for the database on my hard drive and crashes, i've been up all night to solve the problem, but i've had no joy.
Can anybody help, please
My final year project goes out the window, if I can't sort it by 4 o'clock.
Thanks
Connection String For MySQL Database
can anyone help me in this. previously i use Access database for my data storage but now i need to change to MySQL database. can someone help me in the connection string for MySQL database. cos i need to make it working today.
Connection String To A MySQL Database
I have client which wants to store his data online in s MySQL database, and then use a MsAccess front end to access and use the data.
How do I link the tables in the front end to the tables in the MySQL database?
Will
Connection String For Database On Internet
Hi every body I have webspace and my database is saved is there. Now I want to access that database through my application which I have developed in VB 6.0 but don't what connection string I have to use. Or in simply I don't know anything about that weather it is possible or not.
Thanks
How 2 Pc's Can Access A Ms Database Thru A Network.
I know this is in the wrong place, SORRY... Wasn't sure where to put it.
I am coding an app in vb6 that works on one computer. I want to be able to install it on another pc in our network and allow that user to access the same database. We do not have a server but we have shared folders.
Can some one please point me in the right direction or heck for that matter give me all the answers...lol
Database Access On The Network
Hii
I have 3 comp's with win xp on a network and in a workgroup
i would like to create a software so that i could use a database file on only 1 comp and the other 2 comps should connect to the database file using VB.
How could i do that..?
Access Database Across Network
Does anyone know of a step by step(farely to the point) layout of how to create a database access program where the database is located on a server type computer?
Ms Access For Database In Network
I want ask again about Ms Access's ability.
is it ok if i use ms access for network database?
the network here just Local Area Network.
if Ok, how many user that can access the database?
can it take more than 10 users?
Thanks for your attention
MarsGC
Using Access Database In Network
Dear Friends,
Can anybody tell me how to connect to the database which is kept in another PC in network. For which VB will be the FrontEnd Tool and ACCESS or ORACLE may be BackEnd Tool.
The program is for computer institute to maintain student detail records. Whether it may be WINDOWS NT or WINDOWS 2000 PROFESSIONAL or WINDOWS 98 as Platform
Pls give me ur suggessions for this.
Access DB Connection String (ASP)
I'm having problems connecting to a database on our providers web server. Here is the connection string i'm using:
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=email_order.mdb"
What's happening is it is defaulting to the server's C:. Anyone know how I can establish a connection using the URL of the database? For example, Data Source=http://www.website.com/shopping/email_order.mdb.
I've tried something similar btw, and it gave me a filename error. Any Suggestions? Thanks in advance for any help.
Connection String For Ado 2.1 And Access 2k
hi all,
i need the connection string to open an access 2K database file. It is protected by a single password and not a security file ( mdw)
i am used to open connection using ODBC and DSN names , but now i want to make a connection that opens a database file in it's root. What i should supply is the pathfile and password. Can anyone help me
THX IN ADVANCE
BST RGDS
Access Connection String VB.NET
Hi,
This is how I've been building my connection string:
Private sConn As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "Datadb.accdb;Persist Security Info=False"
But when I'm testing the application I get different paths:
pressing:
F5:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:APPNAMEinDebugDatadb.accdb;Persist Security Info=False
CTRL + F5:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:APPNAMEinReleaseDatadb.accdb;Persist Security Info=False
After I build and publish the application and install it on c:appname , this is the path I get:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:Documents and SettingsAdministratorLocal SettingsApps2.0DVWM8P0Y.PA33ZKC1K38.Y2A
eos..t ion_fa806dca50e36afc_0001.0000_059b8e20ea211931Da tadb.accdb;Persist Security Info=False
Thanks in advance...
Connection String To Access
hi guys,
i am building a project using VB and a Databe created in Access.
can i connect to the database without using the ODBC Data source??
thanks,
ohad.
Move Database Off Of Wwwroot Directory Connection String
If I move my Access database from my InetPub/wwwroot/ directory and place it somewhere else on the drive can I use this code
Originally where my database was
Code:
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath("SiteDocSiteDocDocumentation.mdb")
then I change it to
Code:
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath("D:DataWQMADocumentation.mdb")
Will this work? Or do I have to change the mappath differently.
Edited by - Lesviper on 5/26/2005 5:56:13 AM
Deploying An Access Database Ona Network
I have written a Windows App and am trying to install it onto several desktop PC link to a network. My developement PC is not linked to the network. How do I tell the program to look for the data base on the network (i.e. "K" drive)?
Connection String For Access W/password
I'm trying to figure out how to connect to a pword protected access database thru vb6 using ado.
I did some searching and tried some of the examples in http://www.carlprothman.net/Default....orMicrosoftJet, but I'm still having problems.
The example from that page that applies is: oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=c:somepathmydb.mdb;" & _
"Jet OLEDB:Database Password=MyDbPassword", _
"myUsername", "myPassword"
But my db doesn't have a username.
I've only given it a password to keep prying eyes from opening it directly.
The connectionstring I use to open it without a password is:AdoSettings.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "Eva.mdb;Persist Security Info=False"
Can someone tell me how to modify the above connection string to include a password?
MS Access ADO Connection String (Resolved)
Hi all,
I'm trying to connect to an Access database with ADO and getting nothing but a headache
I am have tried the connection string below but get the error "too few parameters -1"
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Documents and SettingsXQMy DocumentsSDBTPData.mdb;Persist Security Info=False;Jet OLEDBatabase Password=Password"
'also tried
'I set up the DSN in the control panel first
'strCon = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=MobSalesDB;UID=;PWD=Password"
The database does not use user accounts and just has a database password. Does anybody see what I'm doing wrong with the connection string?
Thanks!
ADO Connection String For Access W Password
Hello,
anybody know how to open passworded access db with ADO .... ?
I use this one and not workout :
with connobj
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Password=aaa;Data Source=" & strDataPath & ";Persist Security Info=False"
.open
end with
the error msg sound like this
'The workgroup information file is missing or opened exclusively by another user'
thank you..
handy
MS Access Data Connection String
I have a problem connecting to Access DB that I need help with. I have a program which works fine on the PC on which I set up the code and on my laptop. However, when I attempt to run it on my Home PC I get a runtime error '3706' which says
"Provider cannot be found. It may not be properly loaded.'
The debug indicater points to con.open lsDSN as below
Pertinent portions of the code are:
Dim con As New ADODB.Connection
Dim lsDSN As String
Dim rsSample As New ADODB.Recordset
lsDSN = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:MyDataDirMyAccessFile.mdb;" & _
"Uid=; Pwd="
con.Open lsDSN
Set rsSample = New ADODB.Recordset
Query follows in this position
Get and apply data code here
rsSample.Close
con.Close
I used a PC loaded with Win XP SP2 and MS Office with Access 2002
On my home PC I have Win XP SP2 and MS Office with Access 2003
I am presuming there may be some subtle difference that needs to be inserted in the connection string, but in experimenting, I cannot find it. Can someone give me a clue?
Milt Gordon email@removed
Milt Gordon email@removed
[SOLVED] Access Connection String
Hey guys,
Im doing a small project using VB6 and MS Access DB.
The project will be installed on 2 pcs connected via a workgroup (DB will reside on 1 pc).
Then all ill do is give them an EXE each, both pointing to the DB on the "network".
Are the following Global Const and Connection Sub correct for this scenario?
Code:Global Const cnStrACC = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myDatabase.mdb;Persist Security Info=False"
Code:Function OpenDatabase()
Dim cnStr As String
cnStr = cnStrACC
DBError = 0
Set dbs = New ADODB.Connection
dbs.Provider = "MSDataShape"
dbs.ConnectionString = cnStr
dbs.Mode = adModeShareDenyNone
dbs.CursorLocation = adUseServer
dbs.Open
End Function
The 2 lines in BOLD above are the ones i'm most confused about (are they ok?)
Thanks
Edited by - Nasty on 4/6/2005 2:22:16 AM
How To Specify Database Server Or Connection String In A Crystal Report Object
Hi,
In Visual Basic how can I specify the
database server (or connectionstring)
of a crystal report object at runtime?
I need this because the .exe applications
in terminal computers are trying
to load a crystal report which
database resides in server "(local)"
(obviously because I designed the
report in the server and compiled
the visual basic .exe there too)
Thanks a lot for your help
Roland
Visual Basic MS Access Network Database Problem
HI im working on a program in visual basic that requires a client to connect to a server that contains a MS Access d/b over a LAN network (to a remote server). the client needs to display all the fields within the ms access d/b, that the server has. the client also needs to be able to write and read to the database, and also continually update itself.
the server needs to allow for many connections, also allowing to see whos online, and offline. the client should also be abe to view the data of the other clients even if their offline.
this is what i have so far, but i am stuck with this error message:
Run-time error '-2147217904 (80040e10)':
No value given for one or more of the parameters.
this error comes up in the the server project under recordset module:
Quote:
Public Sub SendJobs(Completed As Boolean, sck As Winsock)
Dim Rs As ADODB.Recordset
Dim SQL, strRecords As String
Dim i As Integer
Set Rs = New ADODB.Recordset
SQL = "Select * from Joblist where CompletedJobs = " & Completed 'Querys the Database for Completed and UnCompleted jobs
Rs.Open SQL, cn, adOpenKeyset, adLockReadOnly
For i = 1 To Rs.RecordCount
strRecords = "~!" & Rs!JobID & "~~" & Rs!Date & "~~" & Rs!Name & "~~" & Rs!Phone & _
"~~" & Rs!JobDescription & "~~" & Rs!Technician & "~~" & Rs!pority & "~~"
Rs.MoveNext
FrmServer.sckServer(sck.Index).SendData strRecords
Next i
Rs.Close
Set Rs = Nothing
FrmServer.Label7.Caption = Err.Description
End Sub
ive included the whole project for your convience
Visual Basic MS Access Network Database Problem
HI im working on a program in visual basic that requires a client to connect to a server that contains a MS Access d/b over a LAN network (to a remote server). the client needs to display all the fields within the ms access d/b, that the server has. the client also needs to be able to write and read to the database, and also continually update itself.
the server needs to allow for many connections, also allowing to see whos online, and offline. the client should also be abe to view the data of the other clients even if their offline.
this is what i have so far, but i am stuck with this error message:
Run-time error '-2147217904 (80040e10)':
No value given for one or more of the parameters.
this error comes up in the the server project under recordset module:
Quote:Public Sub SendJobs(Completed As Boolean, sck As Winsock)
Dim Rs As ADODB.Recordset
Dim SQL, strRecords As String
Dim i As Integer
Set Rs = New ADODB.Recordset
SQL = "Select * from Joblist where CompletedJobs = " & Completed 'Querys the Database for Completed and UnCompleted jobs
Rs.Open SQL, cn, adOpenKeyset, adLockReadOnly
For i = 1 To Rs.RecordCount
strRecords = "~!" & Rs!JobID & "~~" & Rs!Date & "~~" & Rs!Name & "~~" & Rs!Phone & _
"~~" & Rs!JobDescription & "~~" & Rs!Technician & "~~" & Rs!pority & "~~"
Rs.MoveNext
FrmServer.sckServer(sck.Index).SendData strRecords
Next i
Rs.Close
Set Rs = Nothing
FrmServer.Label7.Caption = Err.Description
End Sub
ive included the whole project for your convience as the attachment
ADO Connection To Access Database
I am trying to programmatically add a new field to an existing Access 2000 database using an ADO 2.7 connection. I am able to make a successful connection to the database and to open the recordset to manipulate any of the existing data, but I am having trouble finding the syntax to add a new field to the existing database.
My recordset is static (therefore I am using adOpenStatic cursor type on the record) and I am using an adLockOptimistic lock type on the recordset.
If needed I can attach the code and the database (if it helps).
|