Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Firebird Database Connection


Hi,
I am trying to connect to a firebird database and I haven't got a clue where to start.

What is the correct code that I can use to achieve this??

Thanks in advance,
David




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Connection String Problem With Firebird 2.0
when i run the query:

Dim rs As New Recordset

rs.Open "Select * from EMPLOYEES", cn, adOpenDynamic, adLockOptimistic


This runtime error pops up:

Run-Time Error '-2147168242(8004d00e)':

Automatic Transaction mode is disabled.


I use the following connection:

Dim myConn As New ADODB.Connection
Dim sConnStr As String

sConnStr = "Provider=LCPI.IBProvider;Data Source=D:MPM ---MEDSYS.GDB; user=SYSDBA;password=masterkey"

myConn.ConnectionString = sConnStr

myConn.Open


[B]How can i fix this bug?

How To Use FireBird Database With VB
Does anyone know how to use the Firebird Database with Visual Basic 6.0 ?

Connecting With A Firebird Database
I´m sure that i can connect to a "Firebird 1.5" databese with ADO Connection in VB6. But How? I´m seek of looking for and i can´t find anything...

DSN Creation For Firebird Database
Edited by - KoolYogi on 5/12/2003 3:01:43 AM

Create On Fly Database For Firebird Server
In Vusual Basic Script, is possoible to create a Firebird database with:
Name:MY_FDB
Table:MY_TABLE
Filed name:
FILED_1 fomat text
FIELD_2 format text
FIELD_3 format date
FIELD_4 format text
FIELD_5 format number

Adding, Editing, Removing - Firebird Database And Vb
I have in my project:

- 1 datagrid (DataGrid2) - datasource=adodc2
- 1 Adodc (adodc2):
Provider=IBOLE.Provider.v4;Persist Security Info=False;Data Source=C:FUNILARIAdb.GDB;Mode=ReadWrite|Share Deny None
Recordsource: adCmdTable
Table: FUNCIONARIOS
- Buttons: btn_first, btn_next, btn_last, btn_prev


When I click to add a new record it does but then when I click to move throught the recods using the buttons i get an error:

Dynamic SQL ERROR
SQL Error Code = -104
Token Unknown - line 1,char 13
"FUNCIONARIOS"

PS. See attached pics- sequence 01, 02 and 03
01 - Click to add a new record
02 - confirm clicking btn_atualiza and the record is inserted
03 - It seems that the datagrid didnt refresh. The new record is there but it continues at the last record.
I tried to use: Adodc2. Recordset. Requery but it didnt work.


Here is the code:
code to add:
[code]
Private Sub btn_add_Click()
On Error GoTo AddErr
With Adodc2.Recordset
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
mbAddNewFlag = True
SetButtons False
LockTheForm False
End With
On Error Resume Next
txtname.SetFocus
Exit Sub
AddErr:
MsgBox Err.Description
End Sub


Code to confirm adding a record:

Code:
Private Sub btn_atualizar_Click()
cn.ConnectionString = "Provider=ZStyle IBOLE Provider;Data Source=c:funilariadb.gdb;UID=sysdba;password=masterkey"

sql = "SELECT * FROM funcionarios WHERE NAME=" & "'" & Trim(txtname.Text) & "'"
cn.Open
Set rs = cn.Execute(sql)
If rs.RecordCount > 0 And mbAddNewFlag Then
MsgBox "Este nome já esta cadastrado.", vbExclamation, "Name exists"
txtname.SetFocus: SendKeys "{Home}+{End}"
Set rs = Nothing
Exit Sub
End If

sqladd = "insert into funcionarios (NAME) VALUES ('" & Trim(txtname.Text) & "')"
cn.Execute sqladd

'Update all status
mbEditFlag = False
mbAddNewFlag = False
mbDataChanged = False
SetButtons True
LockTheForm True
DataGrid2.Enabled = True
cn.Close
Exit Sub
atualiza
End Sub

Buttons code:

Code:
Private Sub btn_first_Click()
Adodc2.Recordset.MoveFirst
CheckNavigation
End Sub

Private Sub btn_last_Click()
Adodc2.Recordset.MoveLast
CheckNavigation
End Sub

Private Sub btn_next_Click()
If Not Adodc2.Recordset.EOF Then Adodc2.Recordset.MoveNext
If Adodc2.Recordset.EOF And Adodc2.Recordset.RecordCount > 0 Then
Beep
Adodc2.Recordset.MoveLast
MsgBox "Este já é o último registro.", vbInformation, "Último registro"
End If
CheckNavigation
End Sub

Private Sub btn_prev_Click()

If Not Adodc2.Recordset.BOF Then Adodc2.Recordset.MovePrevious
If Adodc2.Recordset.BOF And Adodc2.Recordset.RecordCount > 0 Then
Beep
Adodc2.Recordset.MoveFirst
MsgBox "Este já é o primeiro registro.", vbInformation, "Primeiro registro"
End If
CheckNavigation
End Sub

Adding, Editing, Removing - Firebird Database And Vb
I have in my project:

- 1 datagrid (DataGrid2) - datasource=adodc2
- 1 Adodc (adodc2):
Provider=IBOLE.Provider.v4;Persist Security Info=False;Data Source=C:FUNILARIAdb.GDB;Mode=ReadWrite|Share Deny None
Recordsource: adCmdTable
Table: FUNCIONARIOS
- Buttons: btn_first, btn_next, btn_last, btn_prev


When I click to add a new record it does but then when I click to move throught the recods using the buttons i get an error:

Dynamic SQL ERROR
SQL Error Code = -104
Token Unknown - line 1,char 13
"FUNCIONARIOS"

PS. See attached pics- sequence 01, 02 and 03
01 - Click to add a new record
02 - confirm clicking btn_atualiza and the record is inserted
03 - It seems that the datagrid didnt refresh. The new record is there but it continues at the last record.
I tried to use: Adodc2.Recordset.Requery but it didnt work.


Here is the code:
code to add:

Code:

Private Sub btn_add_Click()
On Error GoTo AddErr
With Adodc2.Recordset
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
mbAddNewFlag = True
SetButtons False
LockTheForm False
End With
On Error Resume Next
txtname.SetFocus
Exit Sub

AddErr:
MsgBox Err.Description
End Sub



Code to confirm adding a record:

Code:

Private Sub btn_atualizar_Click()
cn.ConnectionString = "Provider=ZStyle IBOLE Provider;Data Source=c:funilariadb.gdb;UID=sysdba;password=masterkey"

sql = "SELECT * FROM funcionarios WHERE NAME=" & "'" & Trim(txtname.Text) & "'"
cn.Open
Set rs = cn.Execute(sql)
If rs.RecordCount > 0 And mbAddNewFlag Then
MsgBox "Este nome já esta cadastrado.", vbExclamation, "Name exists"
txtname.SetFocus: SendKeys "{Home}+{End}"
Set rs = Nothing
Exit Sub
End If

sqladd = "insert into funcionarios (NAME) VALUES ('" & Trim(txtname.Text) & "')"
cn.Execute sqladd

'Update all status
mbEditFlag = False
mbAddNewFlag = False
mbDataChanged = False
SetButtons True
LockTheForm True
DataGrid2.Enabled = True
cn.Close
Exit Sub
atualiza
End Sub


Buttons code:

Code:

Private Sub btn_first_Click()
Adodc2.Recordset.MoveFirst
CheckNavigation
End Sub

Private Sub btn_last_Click()
Adodc2.Recordset.MoveLast
CheckNavigation
End Sub

Private Sub btn_next_Click()
If Not Adodc2.Recordset.EOF Then Adodc2.Recordset.MoveNext
If Adodc2.Recordset.EOF And Adodc2.Recordset.RecordCount > 0 Then
Beep
Adodc2.Recordset.MoveLast
MsgBox "Este já é o último registro.", vbInformation, "Último registro"
End If
CheckNavigation
End Sub

Private Sub btn_prev_Click()

If Not Adodc2.Recordset.BOF Then Adodc2.Recordset.MovePrevious
If Adodc2.Recordset.BOF And Adodc2.Recordset.RecordCount > 0 Then
Beep
Adodc2.Recordset.MoveFirst
MsgBox "Este já é o primeiro registro.", vbInformation, "Primeiro registro"
End If
CheckNavigation
End Sub

Faster Connection On Database Using ADODC Connection With SQL7 Database
I had a problem regarding of slow connection on database on our server it has slow feed back on the data. Can you pls. tell how can I make my connection on the database more faster because it takes 1 min. and 30 sec. before it can save data n the database? Thanks

Speed Up DBF Connection && Query (using Index Files (NDX) In Connection To DBF Database?)
My application works fine.
However, I am connecting to two DBF files and the queries are very slow.
[If I copy the DBF files to the local hard drive everything runs fast enough. 1-2 seconds vs. 6-8 minutes]
The DBF needs to stay on the network.

I am guessing that the data access model I am using is copying the entire DBF file across the network to memory and that it why it is slow. I am hoping that using the index will speed things up enough. So can anyone:

Can anyone tell me how or give me a code example on how to use index files?
Tell me more about using DBF files in a speedier manner?

--------------------------------------
Here connection string that I am currently using:
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=U:Data; ;Extended Properties=dBASE IV;"




Edited by - infinity on 11/1/2002 12:06:33 PM

VB6 And FIREBIRD
Hello All,


there are a way to conect VB6 using ADO to FIREBIRD databases (easy)?

i try one DLL called SIBPROVIDER but its not free.

if you know another way (more simple or free), please send to me.


Best regards

Firebird Sp In Vb6
in MSSQL a stored procedure are like this:
Create Procedure "ProcName"
As
Select "fields" From "Database"
End Procedure

If i have a conection obj and a recordser obj i use:
Set Rs = con.Execute
And that returns a recordset for use in my app.

But in Firebid the Sp are like this:
For Select "fields" From "Database"
Into :"OutVariables"

This Sp dosn´t return a Recordset for my app.
What can i Do to have a recordset in VB6.

Please sorry for my english.

Diego
Bs. As. -Argentina-

Vb+firebird Db
i am an newbie in firebird, i want to ask, in example how to connect the vb to an firebird server and how to make an select or insert. thanks in advance.

VB And Firebird Fbdll4vb.dll
Hello,
Today I have searched internet to find out how I can connect to firebird database using "fbdll4vb.dll". But I could not find any answer.

I wrote a simple application that uses .mdb but now I want to use firebird database. Because I was told that using a single dll I would be able to distribute my application instead of distributing whole db server. But I could find how to call dll from VB.

I would appreciate any help and information
Thanks in advance

I Want To Connect Firebird With Vb6
well, i need to convert my programs:

from msaccess 2000 to firebird 1.5 .

please,
How do i proceed?

Firebird DBMS And VB 6
Can anybody show me an example on how to connect a VB application to a Firebird database?

Connect To Firebird
Can anyone assist me in getting connected to a firebird database using vb6?? Greatly appreciate it. I'm having trouble with the connection string.

Firebird Problem
I´ve been using a firebird database (db.GDB) in my project.

There is a datagrid connect to an adodc in my project that gets all the infos from that and dysplays them.

When I delete a record the datagrid doesn't update.
I´ve tried to refresh the datagrid but didn' t work.
I´ve also tried to commit

Any ideas?


Code:

Private Sub btn_del_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim sql As String

If MsgBox("Are you sure you want to delete this record?", _
vbQuestion + vbYesNo + vbDefaultButton2, _
"Delete Record") _
<> vbYes Then
Exit Sub
End If

sqld = "DELETE FROM table WHERE id = " & id & ""
cn.Open
Set rsd = cn.Execute(sqld)
cn.CommitTrans
cn.Close


With Adodc2.Recordset
.MoveNext
If .EOF Then .MoveLast
If .BOF Then .MoveNext
End With


sql = "Select * From table"
cn.Open
Set rs = cn.Execute(sql)
cn.Close
DataGrid2.Refresh


When I close and opens the project again it works after I delete a record

VB 2005 Express And Firebird
I am using Visual Basic 2005 Express Edition and I want to use and embed (I'm not sure if this is the right term) Firebird as the database. However, when I try to choose a data source I only get "Microsoft Access Database File" and "Microsoft SQL Server Database File". How can I insert a Firebird file?

FireBird 1.5 Data BackUp In VB
Hello,

we are using Firebird 1.5 as Data Base,How can BackUp And Restore using
VB ,please help me..

Thanks

mathew

DAO Connection To SQL Database Using Trusted Connection??
Hello,
I'm attempting to connect to a SQL database using DAO. The DSN was set up using a "trusted connection". In the past I've successfully used the below code to connect to Access databases - but it currently doesn't work for my SQL database (I've tried taking "UID=sa;PWD=;" out of the connect string and replacing it with variations of "Trusted Connection=Yes" but it doesn't work - syntax perhaps?). Will someone please enlighten me as to the problem? Many thanks...

Code Snippet:

Private m_sDsn As String 'Data Source
Private m_wWrkODBC As Workspace 'DAO workspace object
Private m_cConnectODBC As Connection 'DAO connection object

Set m_wWrkODBC = CreateWorkspace("NewODBCWorkspace", "admin", "", dbUseODBC)
Set m_cConnectODBC = m_wWrkODBC.OpenConnection("Connection1", , , _
"ODBC;DATABASE=;UID=id;PWD=pwd;DSN=" & m_sDsn)

* Combo Box - Nothing Is Read From Database - Connection To Database Incorrect ?*
I'm having a problem with reading data froma database to fill a combo box - nothing shows at all - and i'm unsure of what might be the problem.
Hopefully someone could check out my following code and see what needs to be done...also, i have a feeling that my connection to my MS Access database is incorrect and thus might be why i having so many difficulties...
could someone please confirm this with me before i progress any further ?

I would really appreciate that.
here is the code i am working on for the cbobox procedure, and the second example is taken out of what i have in my code module...


Code:
Option Explicit

Dim rs As ADODB.Recordset
Dim Con As ADODB.Connection
Dim ssql As String


Private Sub Form_Load()
Move (Screen.Width - Width) / 2, (Screen.Height - _
Height) / 2

End Sub

Private Sub cboSelector_DropDown()

Dim rs As ADODB.Recordset

Set rs = New ADODB.Recordset
Con.Open strCon

'sql statement to select items on the drop down list
ssql = "SELECT MemberNo FROM Members"
rs.Open ssql, Con

Do Until rs.EOF
cboSelection.AddItem rs("MemberNo") 'Adds MembersNo to dropdown list
rs.MoveNext
Loop

'Close connection and the recordset
rs.Close
Set rs = Nothing
Con.Close
Set Con = Nothing
End Sub

End Sub

and now my code module, what i have of one thus far.if i'm missing anything, please let me know


Code:
Option Explicit


Public rsLibrary As ADODB.Recordset






Public Function readdatabase(strsql As String) As ADODB.Recordset

Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
Set rsBook = New ADODB.Recordset

cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:Phase2_ProjectLibrary.mdb; Persist Security Info=False"

cn.Open
With rsBook
.ActiveConnection = cn
.CursorLocation = adUseClient
.CursorType = adOpenForwardOnly
.Source = strsql
.Open
End With
Set readdatabase = rsBook
End Function

Public Sub updatedatabase(strsql As String)
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
Dim comLearn As ADODB.Command
Set comLearn = New ADODB.Command

cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=A:Phase2_ProjectLibrary.mdb; Persist Security Info=False"
cn.Open

With comLearn
.ActiveConnection = cn
.CommandText = strsql
.Execute
End With

End Sub

Public Sub fillcbo(ByRef rs As ADODB.Recordset, cbo As ComboBox, strList As String, strNo As String)
While Not rs.EOF
cbo.AddItem rs.Fields(strList)
cbo.ItemData(cbo.NewIndex) = rs.Fields(strNo)
rs.MoveNext
Wend
End Sub


thanks for any efforts in advance!
appreciated as always..

Firebird Syntax Error On VB 2005 (was: Help Me This Is Strange.....)
Public Function CheckSyntax() As Boolean
Dim sqlstr = "select*from master_coa where code=10005"
Dim myCmd1 As New FbCommand
Dim mydare1 As FbDataReader
Dim hasil As Boolean
If OpenSQLConnection() = False Then
FireBirdModule.OpenSQLConnection()
End If

myCmd1.Connection = FireBirdModule.myConnection
myCmd1.CommandText = sqlstr
If FireBirdModule.OpenSQLConnection = True Then
With myCmd1
mydare1 = .ExecuteReader
If mydare1.HasRows Then
hasil = True
Else
hasil = False
End If
mydare1.Close()
mydare1 = Nothing
End With
End If
Return hasil
FireBirdModule.CloseSQLConnection()

End Function



i really don't understand that function always return true;
where is the problem my function or my firebird syntax?
thx

I Need To Change My Database Connection To Another Database..
I used this code:


    axDbConnectionString = GetSetting("PixentPOS", "Database", "ConnectionString")
    
    If Len(axDbConnectionString) > 0 Then
    
        If DataPos.Connection1.State = 1 Then
            DataPos.Connection1.Close
        End If
        DataPos.Connection1.ConnectionString = axDbConnectionString
        DataPos.Connection1.Open
    
    End If

When I open the New conection they don't use the New Conection string...

I forget something??


    


    


 

Connection Database
hi i have a chat program and i am setting up a website with a myslq database. the thing is i want to connect with this database and sed.rfeceive data. how would i go about doin this??

Database Connection
Hi, How to connect ADODC object to database.
I want my DB available anywhere I move my folder.something like App.Path but I dont know how to use it in ADODC object

Database Name In ADO Connection
This is ultra urgent!!!

How can i know the database name of ADO connection ? yes, name of database where the system is connected.

Please, i am waiting for a answer!

Thanks a lot,

Database Connection
Hi

i have just started using database and i have no idea how to do it.I have oracle 8 as the backend.

when i used this it gave me an error saying datasource not found.

Private Sub Command1_Click()

Dim ad As New ADODB.Connection
ad.Open "DSN=LocalServer ;UID=scott;PWD=tiger"
ad.Execute "insert into emp (empid,name,soc_sec_no)values (txtempid.text,txtname.text,txtssn.text)"
ad.Close
End Sub

plz help

Any Database Connection
I need to get data from a field in an Access DB, but I will not know the name of the field until the user selects an item. So I have to get the contents of that field dynamicaly.


I would like to replace !FirstName with a Variable

With rsADOSetRecord
.Open "blah blah"
Do While Not .EOF
Combo1.AddItem !FirstName
Loop
End If
.Close
End With

Database Connection
I'm using this code to open database using ADO.
-------------->><<<<-----------------------------
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & path & ";"

Set rs = New Recordset
rs.Open "SELECT * FROM Client", db, adOpenStatic, adLockOptimistic

rs.MoveFirst
rs.MoveLast
MsgBox rs.RecordCount
-------------------->>>>>>>>>>>><<<<<<<<------------------
the above works fine (when the DB is without a password). However, the problem that I'm encountering is that I need the database password protected. when add user and password to the connection string such as:
db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & path & ";", "admin", "client"

gives me this error: "Cannot Start your application. the workgroup information file is missing or opened exclusively by another user.

Anybody knows what is wrong with my code.

I'd appreciate your inputs.
Thanks a million
Roger

"Great Ideas need Landing Gears as well as Wings"

Connection To Database
I have a project that connects to a database

When the main form loads it loads the following code. If the person running the program doesn't have the exact drive mapping to where the database is stored it ends the program. Is there a way for it to prompt the user to change the location?

Database Connection
Is there a difference between creating a connection and using the opendatabase command? I'm using access 2000 and for the most part I've been doing something like :

Dim dbs As Database
Dim qdfTemp As QueryDef

Set dbs = OpenDatabase("c:/databaseName.mdb")
Set qdfTemp = dbsAgency.CreateQueryDef("")

This works fine, until I want to insert, update, or delete data from the database. i thought that dbs.execute("insert....") would work, but apparently it doesn't or I'm missing something. Suggestion? Should I create a new connection instead of using what i currently have?

Database Connection
Hi, I would like to connect to my access database, which is on web server from a visual basic application. How would I do this in the connection string of my application?

I have took the db out from the db directory on the web server and is in the webroot.

Yes I know its not secure the db but not to worry about that

Reg Database Connection
Set adoConnection = New adodb.Connection

With adoConnection
.ConnectionString = "UID=tt;PWD=ttt;" _
& "DRIVER={SQL Server};DATABASE=pubs;" _
& "SERVER= TEST2 ;"

.Open
End With


In the above statement , is there anything wrong ?
I am not able to establish the connection.

Do we need to configure anything in my system for the Driver = { SQL Server } before running this statement..

What are all the things I should make sure before running the above statement ?

FYI, I am able to connect to SQL Query Analyser for this Database in this server giving the above user id and password.


Pls reply..

Thanks..

Database Connection
I keep having this trouble when ever I develop on my laptop and then move over to the servers. I have XP and SQL server 2000 on my laptop which is what I use as my desktop every day and it goes home with me. I have a test server on my desk which is just that. If I develp on my laptop then move them my connection string doesnt ever work and I have to go through every page and modify it.

In my global.asa file is where I keep my connection string on my laptop and it is set up this way:

Sub Application_OnStart
Application("DB_CONN") = DSN="DRIVER={SQL Server};SERVER=XXXXX;UID=XXX;PWD=XXXX;DATABASE=workRequest"
Application("LOGONPAGE") = "http://XXXX-XXXX/workOrders/workorderlogin.asp"
End Sub

and call it in the pages with this:

Set objConn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
Set RS = CreateObject("ADODB.RecordSet")
objConn.ConnectionString = Application("DB_CONN")
objConn.Open

But it does not work that way in Win 2000 and there isnt any difference in the way either of them run.

Always gives me some error of not being able to find the data source which is bull cause its there.

Do any of you have any ideas why I cant use the same connection string in both environments?

Thanks in advance!

Edit: Moved from Database

Database Connection
Using VB6 and MSDE, to speed up the app, is it a good idea or bad idea to leave the database connections open instead of closing it after each query?

Also, is it posible to put the connection code in a module and then not have to open it on each form? If so, is that a bad idea?

Thanks,
bucko

Connection To Database
I need to use App.path to connect database.
So i used this code : Conn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "NYP_StaffProfile_2000.mdb"

But its not working, can someone help me?

Database Connection
I’m connecting to an access database using the data environment. I am using my connections to populate list boxes and combo boxes to view data. I will also be populating the database with grid controls and combo boxes.

Is the data environment the best method to use to connect to the database or should I code my connection when the program starts and then write data into my controls programmatically.

Could you advise me of the pros and cons and the correct methods for connecting to a multi user database.

Database Connection
i found a problem in connection btw mysql and my vb project.

details is like this, i make connection in a module. but i cannot access the connection through other forms. i dunno y .

can anyone show me some code tat or give me some good suggestion . thanks.

Or suggest some useful website to me . thanks .

Database Connection
i need some help..

i have a simple program connecting to access database.

this is my code in my module


Code:
Public dbconnect As New ADODB.Connection
Dim strcnn As String

Sub main()

strcnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Documents and SettingsadministratorMy Documentslibrary.mdb;Persist Security Info=False"
dbconnect.CursorLocation = adUseServer
dbconnect.Mode = adModeReadWrite
dbconnect.ConnectionString = strcnn
dbconnect.Open

Form1.Show
End Sub
my problem is.. i want to change my datasource in application path (so you dont need to create a directory to have the same path when you run the program in other pc)...

but i dont know the code...
please help me..

Database Connection
Hi there, I have a very odd problem with my app. The problem is that when I establish a database connection through the Server explore and add an setup project to it, after I install the app to target computer I get an error which says that the database is missing. It seems that the path which connects to the database is the same as in my development computer. My question is how should I configure the database connection that will have the connection path pointing to the database in the client computer (in the app folder)?

Thanks for your help!

Database Connection Using IP
Hi,

I am trying to set up a database connection in my classroom. I can easily set up a connection a


Code:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;_
Data Source=\school1
oom110databasesdata.mdb"
but I have to make the database folder visable on the network, therby allowing anyone access to it. Is there a way to connect using the computers name or IP address?

Thanks,

David

==How To Connection To A Database At Another Loc?
I have a couple applications at my local office here. How can I connect to a database in SQL Server 2000 at another office (corp office)?

Thanks.

Database Connection
I am trying to connect to a database at a specific IP Address. I have the Address, database name, table names, and user ID (there are no passwords). I am not a VB programmer but I need to use VB to do this project. I have found the following code somewhere on this site.

Dim strConnect As String
Dim cn As ADODB.connection
Dim rs As ADODB.Recordset

'strDataSource = Server name
'strCatalog = database name
'strUID = user id
'strPassWord = User's password
strConnect = "Provider = MSDASQL.1; Persist Security Info = True; Data Source = " &strDataSource& "; Initial Catalog = " &strCatalog& "; user id = '" &strUID&"'; password = ''; "

cn.Open strConnect

rs.Open "Select * from Students", cn, adOpenKeyset, adLockOptimistic

I get an error at
cn.Open strConnect
saying Object variable or With block variable not set.

I have referenced the ActiveX data objects. I'm really lost on this and would appreciate help. Thanks

Connection With Database
hi guys,

i am using VB6 and Crystal Report 8 and SQL Server 2000.

i got an problem with crystal report and i.e. i have to change the server name in every report file. i got about 30 reports and i have to use my project in various computers so i need some help to solve this problem.

i have send parameters of server name,userid,password of database from VB also but ...............

How could i can get autometic server name in crystal report.

Please help me guys.

No Database Connection
hi i have been using vb6 for some time now, i have cteated a database program to log all my dvds. i run three computers one of them for all my media.

when i make my program in to a exe file it works fine on my computer witch has vb installed on it. but when i move it to my other computer were i want to use it most i have no connection to the database, the program loads up ok so i know its not a problemm there.



i have used DATAENVIROMENT to connect to the database as i have reports i have created in there to..



any help would be great



regards craig

Database Connection
hey guy'z,
i transfer my project on another pc the connection of my project to the database in access, and when i run my prog, an error occurs saying the databse cannot found, so that before running my program i fix first the connection using the properties window, is there another way to connect my database to my program so that when i transfer it to another i would not fix it again?

Database Connection
Hello All,

I am creating an app that is installed in a client server architecture. the database(which is MS Access 2003)will reside on the server only. Please advise me on how to connect my client application to my database at application runtime on the server. I am using ADO Coding.

So the facts are that :
- I may not know the server name that the server application and database are being stored on.
- I have to connect my client app to my database on the server

thanx for the help. any example code will be appreciated

Database Connection
How would I go about creating a database to store usernames and serial keys, and getting my project to connect to the database and verify if the users username and serial key are correct?


PS: I just got VB6 about 4 days ago

Thanks in advance.

Database Connection
Hi! I am trying to connect to my database. The database is in another computer. below is my connection code:

VB Code:
Set MyConn = New ADODB.ConnectionMyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;data Source=\NetServerDbaseDatLibrary.mdb"MyConn.Open


Below is the error:
Microsoft Jet Database engine cannot open the file '\NetSeverDbaseDatlibrary.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

Copyright © 2005-08 www.BigResource.com, All rights reserved