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




VB6 - SQL - BIBLIO.MDB Database


I am trying to design a small database project for school. I have gone over this for about a gazillion time, and it seems to have turned into a challenging maze. This is from the book "Visual Basic 6 How to Program." Anyway, where is the problem:

Define a complete query application for the Biblio.mdb database that comes with Visual Basic compiler. The user should be able to edit existing data and add new data to the database. Provide a series of predefined queries with an appropriate name for each query displayed in a Command Button or List Box. Provide the following predefine Queries:

A. Select ALL authors from the Authors table.

A. Select ALL authors from the Authors table.

B. Select ALL publishers from the Publishers table.

C. Select a specific author and list ALL books published by that publisher. Include the title, year and ISBN number. Order the information alphabetically by title.

D. Select a specific publisher and list ALL books published by that publisher. Include the title, year and ISBN number. Order the information alphabetically by title.

E. Select a publisher and display its address, phone number and fax number.
For each of the preceding queries, the results should be displayed in a GRIDBOX Control.

The queries in both C and D might use both a DataGrid / Hierarchical / FlexGrid and TextBoxes for the for the author or publisher name.
Your program should allow the user to UPDATE fields, DELETE records, FIND records by a given field and ADD records to the database.

This here is where I originally posted the question:
http://www.richiecomp.freewebspace.com/index_1.html

I used this file http://richiecomp.freewebspace.com/O...%20Product.rar as a template for my work. It comes on the CD-ROM from the book VISUAL BASIC 6 – HOW TO PROGRAM.

This here, http://richiecomp.freewebspace.com/A...nishedWork.rar , is a work-in-progress. I have been using the original file in order to fill-in the blanks. However, I seem to be logically stuck on joining tables.

This here www.itipnet.com/hayesweb/biblio.mdb is the Access database file to which the Visual Basic projects connect.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Vb6 - Sql - Biblio.mdb
I am trying to design a small database project for school. I have gone over this for about a gazillion time, and it seems to have turned into a challenging maze. This is from the book "Visual Basic 6 How to Program." Anyway, where is the problem:

Define a complete query application for the Biblio.mdb database that comes with Visual Basic compiler. The user should be able to edit existing data and add new data to the database. Provide a series of predefined queries with an appropriate name for each query displayed in a Command Button or List Box. Provide the following predefine Queries:

A. Select ALL authors from the Authors table.

A. Select ALL authors from the Authors table.

B. Select ALL publishers from the Publishers table.

C. Select a specific author and list ALL books published by that publisher. Include the title, year and ISBN number. Order the information alphabetically by title.

D. Select a specific publisher and list ALL books published by that publisher. Include the title, year and ISBN number. Order the information alphabetically by title.

E. Select a publisher and display its address, phone number and fax number.
For each of the preceding queries, the results should be displayed in a GRIDBOX Control.

The queries in both C and D might use both a DataGrid / Hierarchical / FlexGrid and TextBoxes for the for the author or publisher name.
Your program should allow the user to UPDATE fields, DELETE records, FIND records by a given field and ADD records to the database.

My webpage with the problem is located at:
http://www.richiecomp.freewebspace.com/index_1.html

I used this file http://richiecomp.freewebspace.com/O...%20Product.rar as a template for my work. It comes on the CD-ROM from the book VISUAL BASIC 6 – HOW TO PROGRAM.

This here, http://richiecomp.freewebspace.com/A...nishedWork.rar , is a work-in-progress. I have been using the original file in order to fill-in the blanks. However, I seem to be logically stuck on joining tables.

This here www.itipnet.com/hayesweb/biblio.mdb is the Access database file to which the Visual Basic projects connect.

Dynasets With The Biblio.mbd
I am trying to figure out how to open the
biblio.mdb or the Northwind.mdb in Vb with a dynaset. I tried the sample that came with my VB6 software but it didnt work. Anyone have a simple sample that would help me. I can do the opentable one with no problems just cant get the dynaset or the snapshot one for that matter to open correctly.

SQL Query/Biblio
Using JET (Access) and ADO.

I'm new to working with databases, and I need some help with Querying the Biblio database w/VB6.

I need to display all titles by a specific author. For instance, a user would pick from a list of authors and once an author is selected the DataGrid would become visible and contain all of the titles by that author.

Does anyone have any advice on this or know where I could find some information on it?

Thank you

Rebuilding Northwind Or Biblio Db
If I wanted to create a database without using access, is it possible to write a routine to rewrite one of the dbs that ship with vb 6.0? Then write another to rewrite the fields in the blanked db? I don't have microsoft access and I am rather new to the db scene. But, I've been reading about how to assign new sections to the existing dbs, and was wanting a second opinion as to wheather or not this is a feasible alternative to creating a db with access. I am trying to build a blank db template that could be easily altered and deployed.

Accessing Nwind & Biblio Databases
When I try to open up those databases (by either double clicking or right mouse button click) and I get asked what I want to use to open them up. It comes up with a list of programs to choose from, but I have no idea what to use. I have VB6 SP3. Help please!!!

Adodc And Oledb Connection Ot Biblio And Find Button
I have coded a connection to the biblio databasse that ships with microsoft access and coded a visual basic form connection string and i am trying to create a form that has a search capabiltiy.. but am having problems am allways getting this error
run time error '3001' argumetns are of wrong type are out of acceptable range or ar in conflict with each other...
Using an adodc recordset amd an input box to search for particualr record


code for find button is the follwoing

Dim sString As String
sString = InputBox("Enter a search string:")
If sString > "" THen
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find sString, 1, adSearchForward

Have ried that and tried someting like his aswell
Adodc1.Recordset.Find "MyField='Something'", 1, adSearchBackwards

Have done botyh ways and still getting that same error mesaage

Has anyone else had this problem

Richard Pauer

Extremely Annoying Database Related Problem! (but Not Database Question)
Code:
Private Sub JuicebarSave()

'Start Saving the Juice bar Values!

On Error Resume Next
Call Settings.DBconnect

MyRecSet.Open "Juicebar", MyConn, adOpenDynamic, adLockPessimistic, adCmdTable

X = 0
Do Until MyRecSet.EOF

If Price(X) <> Format(Price(X), "0.00") Then
MsgBox ("Price for Item " & X + 1 & " is not in the right format, all prices must be in the form of currency. (Ex: 10.00 or 1.50)")
Exit Sub
End If

If Color(X).Text = "" Then Color(X).Text = " "
If Item(X).Text = "" Then Item(X).Text = " "
If Price(X).Text = "" Then Price(X) = " "
MyRecSet.Fields.Item("Item").Value = Item(X).Text
MyRecSet.Fields.Item("Price").Value = Price(X).Text
MyRecSet.Fields.Item("Color").Value = Color(X).Text
MyRecSet.Update
MyRecSet.MoveNext
X = X + 1
Loop

MyConn.Close
Unload Me
End Sub

Private Sub StudentStoreSave()

'Start Saving the Student Store Values!

On Error Resume Next
Call Settings.DBconnect

MyRecSet.Open "StudentStore", MyConn, adOpenDynamic, adLockPessimistic, adCmdTable

X = 0
Do Until MyRecSet.EOF

If Price(X) <> Format(Price(X), "0.00") Then
MsgBox ("Price for Item " & X + 1 & " is not in the right format, all prices must be in the form of currency. (Ex: 10.00 or 1.50)")
Exit Sub
End If

If Color(X).Text = "" Then Color(X).Text = " "
If Item(X).Text = "" Then Item(X).Text = " "
If Price(X).Text = "" Then Price(X) = " "
MyRecSet.Fields.Item("Item").Value = Item(X).Text
MyRecSet.Fields.Item("Price").Value = Price(X).Text
MyRecSet.Fields.Item("Color").Value = Color(X).Text
MyRecSet.Update
MyRecSet.MoveNext
X = X + 1
Loop

MyConn.Close
Unload Me
End Sub


Okay so when I save the "Juice bar" settings, the window like, closes for an instant (it flickers) and it seems to have been reopened

But when I save the "Student Store" settings, it Closes the window, and doesnt come back...

I copyed the code from Student store to Juicebar, and still have the problem...

Any ideas?

Calling An Excel Macro From An Access Database That Refers To That Database
hi

i have a macro in excel that inserts some values into a table in a database in access, but i want to make it so i dont have to touch the excel file, instead i have a module in the access file that calls the sub in the excel file, but then i get an error saying that the database is already open....is there a way of getting around this?

thanks

jimmyp

Database Ocx To Open Database,Addnew,Delete,Change,Find,
Database ocx to open database

Most of my program is database

Did somone make OCX to open database so pepole dont need to program same sourse.

Or if somone can help me to make 1 OCX

Please Send me email to ssalomon@simnet.is / siggisal@hotmail.com ,, Subject Database OCX


ssalomon

Apogee Database - How To View The Database Structure, Tables, Fields?
I have to work with an Apogee database but I cant seem to figure out how to view the database structure, tables or fields. I'm looking for a tool or a way that will allow me to view the structure to see which fields I can pull data from.

I'd like to connect to it with VB6 or VB.Net but I cant seem to find out how to connect to it exactly.

 I believe that the Apogee database is a product of Binary Research Incorporated. Ive searched google for information regarding the Apogee database but I think its so old that there isnt any.

Thanks for any information.

How To Link Remote MySQL Database To Local Access Database?
i try to create Access DB, and link some tables from remote MySQL DB to this local DB.

it's very easy to do it manually.
could any one tell me how to do it in VB program?
Thank you so much!

* 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..

Error: Unregconize Database Format After Convert Database
previously i design my database using Data Manager. after that i wish to set password to the database using Access 2000, but the 'Set Database Password' is disabled. So i convert the database to current database, then i can set the password.

BUT, i come back to my program, all Data Control cannot be refresh. an error says "Unregconize database format....". After sometime of exploring, i change the Connect property from Access to Access 2000, now it can run properly.

BUT, after i compile the program, make a setup package, and reinstall to other PCs, some PC can work but some PC give Error 3170 - Could not find installable ISAM.

anyone can advise?

how can i remain the Data Control's Connect property to Access, so that other PCs can work properly? is it i must convert the database using Access below 2000?

please advise. thank you.

VB6 Or VBA - Copy Table Contents From One Database To Identical Database
Ladies and gentlemen,
first I want to wish each and every one of you a wonderful and prosperous new year.

This is not really a problem. I am looking for an efficient and quick way to copy table content from one database to identical tables in another identical database.

I have two Access databases: "PTSPROD" which is production database and "PTSTEST" which is a test database both databases have 10 identical tables each.

Objective: I need to erase the contents of 5 of the tables in "PTSTEST" then copy contents of 5 similar tables from "PTSPROD" into "PTSTEST".

I could mannually delete the table contents, then copy and paste, but that will be crude.

Question: How can I programatically accomplish this task faster?

Thanks.
tgif

Transferring VB Project From Access Database To SQL Server Database
Hello,

I have been working on a project at my employer to bring a current program that is run by a third-party company, in-house so that we can run it ourselves instead of paying out monthly fees to the third-party company.

The basics of the program are fairly simple. However, after getting the code about 90-95% done, I am realizing that my Access database will quickly become too small to use. I know we have SQL Server on at least one of our servers, and am thinking about trying to use that instead of Access.

My question is, how hard would it be to transfer my project to a SQL Server database instead of an Access database? I am using ADO to connect to my Access database right now. Would I have to make any adjustments to my VB code? I realize some of the SQL in the code will need to be adjusted, but what about my cn. and rs. lines of code (connections and recordsets)?

Shame on me for not realizing Access's size limitations before now. Any information that anyone can provide is greatly appreciated. Thank you in advance.

Reading ADSI Database With VB && Store In SQL SERVER Database
This is first time I m looking for help in any VB forum I hope I can get some useful hint or help regarding my current problem. Let me describe in brief what we want:

We have one vb application which uses the MS-SQL Server Database. We want some changes in the login screen as per our new requirement.

What we want
1)We want to add one form which will show one button called ‘Update Users’ on clicking the button application will read the current users from the ADSI and store/update in the SQL-DATABASE(User Name and password in the existing table in our database).

2) When we will start the application system checks for the current windows user name and password if same user name and password exist in the MS-SQL Server database then there is no need to show login page but if the user name or password not in the database then prompt for the Login Screen

Please help me to find out how to read the ADSI Database using the VB Application email (bestloveh@yahoo.com)

Thanks

Export Data From Local Database To Mysql Database On Web
I have an access database and a clone of that database in mysql format on a webserver. Using vb, is there a way I can populate the mysql database with the data from the access database (It's only one table)? That would save me from having to manually upload a csv to my server all the time...thanks for your help!

Visual Basic, Read From Database And Write Another Database.
I need to read from a table that is located in one database but I need to write some records in other table that is located in other database.

Please/

Select And Insert From Shared Database Into The Local Database.
Hei hei Kiran;
felt happy for your intrest.
Ya, I will explain a bit more about my problem.
Now I have a MS Access 2002 Database which is working perfectly in one system.
Now I have splitted this database with the 'Database splitter' tools menu.I put the backend in a shared folder and front end in every client system and it is working perfectly, without doing any changes.
But as the databse is in the shared folder and the user will have access to this folder only when he has net connection but most of the time they have to work offline.
The user must have access to change only one set of data at a time.
So I have to copy only that set of data from the database in the shared folder to the tables which are in the frontend MDB file.
I think as I don't need to copy all tables, I have to create empty tables which I need to copy and fill the required data into them with VBA code.
for this I need to kow how to connect to the databse in the shared folder and insert into the local database.(of course I have to use the style of connection to connect to the local database as well.)
Is it comprehensible to you , if not i am sorry , please ask where did u not understand.
Any way Thanks a lot for your intrest .

Kiran Karnati.

Convert Access Database To Works Database Via Code?
Does anyone know of a way to convert an access 2000 database to a msworks database via VB6 code? ANY suggestions are welcome. TIA.

How To Import MySql-database Table To Access-database
I'm building a client-database in .NET for my work and I'll have the program copying rows of data from the online MySQL-database to a local offline Access-database. Everything looks alright when opening the local database in Access but when opening it in my app I get an error saying that the index or primary keys will conflict because of duplicates. I have tried endlessly to switch primary keys, creating new ones but nothing seems to help. Any suggestions?

How To Locate Database In CrystalReport If Database Location Is Changed !
Hai,


FrontEnd     : VB 6
Database     : MsAccess
ReportingTool : CrystalReport Designer 9

       I am developing a application in VB 6 with MsAccess as the BackEnd, Now i am having the database and project everything the machines desktop where i develop, After i completed the project if have to put the databse in the Server and create the package and have it in a CD to install in the client machine, at that time how i will change the CrystalReport Designers database path, now while developing in my PC, what i did is, i created the connection through OLEDB and through the CrystalDesigner --> DatabaseExpert i choosed the path of the Database which is in the Desktop in the same directory where the Project is, now after i complete the full project when i place the database in to the server, how the report will be connected to that database in the Serever instead of the connection made in the Desktop. So what i have to do before creating a package.

Before Creating the package i have to place database to the server and change the path or is there anyother way. But after placing the database in the Server if i am going to change the path means then i am loosing all the fields which i placed in the report before, then i need to design the whole report again by placing the fields again. Kindly anyone let me know how to rectify this.

Thankyou,
Chock.

How To Use An Online Database Like The Internet Movie Database Or The CDDB In A Vb 6
Hello I'm trying to create my own organizer of home entertainment, movies, cds, games, exct..., and what I would like to know is how to use the database that already exsist out there to populate the info and load covers all from the online databases like the IMDb or the CDDb, I see there are other programs out there that already use them.
Any help will be greate

Thanx
Venom

Transfer Database Method - Transfering A Whole Database
Hi there, I am fairly new to using VB with access so this may seem a simple thing but im not quite sure what to do.

I am trying to produce a form which will import a complete database, now I thought the best way would be to open a dialog box where the user can search the computer for the database that they wish to import and then to use this path to transfer the database over.

I have come across and looked at the transferDatabase method and getting it to import tables i.e.


Code:
DoCmd.TransferDatabase acImport, "Microsoft Access", _
"C:DBSNWSales.mdb", acTable, "NW Sales for April", _
"Corporate Sales for April"
(or at least something to that effect )
As I would not know the exact number of tables or even in somecases their names is there anyway for me to import every table without explicitly specifying what the table names are i.e. just simply import the whole database not just a table at a time.

Cheers for your time and help
Rakesh

Moving Info From Field From Database To Database
I have 2 database for storing different information. In my 1st database "CustInfo" I will store the information of the customer in a table call "Infomation". In my 2nd database "data", it stores the customer's transaction under a field "trans" in a table call "transaction". Can I link the info together, which means that whenever the "trans" goes to the "data" database, it also directly goes into "trans" field (new field created) in "Information"? I need to sort them by "indexno" (which both of the database also have). I hope I have not confuse you...

Local Database In Sync With Online Database
I want to develop a tool with a database in local network. The local database can be access or any RDBMS. If I add a record to this database this modification is to be reflected in the online database. We also have an interface in the web for adding or modifying records using form parameters. We also employ cookies to maintain the client user to signin and do these operations. But we need a local java tool to update the local and online database. Is it possible with java or else VB. Please any one help me.

Moving Info From Field From Database To Database
I have 2 database for storing different information. In my 1st database "CustInfo" I will store the information of the customer in a table call "Infomation". In my 2nd database "data", it stores the customer's transaction under a field "trans" in a table call "transaction". Can I link the info together, which means that whenever the "trans" goes to the "data" database, it also directly goes into "trans" field (new field created) in "Information"? I need to sort them by "indexno" (which both of the database also have). I hope I have not confuse you...

Database Needs To Be Repaired Or Isn't A Database File ERROR
I have received the following error twice now and am unsure as to the cause:

The database rdstables.mdb needs to be repaired or isn't a database file.

You or another user may have unexpectedly quit Microsoft Access while a Microsoft Access database was open. Do you want Microsoft Access to attempt to repair the database?

Creating A Database At Runtime And Saving The Database
I have a question ok i have a database i want to be created at run time how do i go about doing that in the program its a personal inventory so it has to be saved evertime things are added and updated so if any of you could help me that would be great

Get The Path Of An Access Database From The Database Object?
If I use the following code to open a database in a code module:
Code:Function ConnectMDB(dbPath As String, dbName As String, objTmpDB As Database) As Boolean
    On Error Resume Next
    Set objTmpDB = OpenDatabase(dbPath & dbName, _
        Connect:="Driver={Microsoft Access Driver (*.mdb)};" & _
        "Uid=Admin;Pwd=;")
    If Err.Number = 0 Then
        ConnectMDB = True
    End If
    On Error GoTo 0
End Function


And call it using:
Code: If ConnectMDB(dbPath, dbName, dbKB) = False Then

Can I later get the system path of the database file from the object "dbKB"? Reason: I use the dbKB object thruought my userform which is loaded much later, but I need to know the path of the database without creating an additional userform property.

|
+--JDMils
|
+--VB6
+--VB Dot Net
|
+-- Navman GPS Forums @ http://forum.jdmils.com
|

Convert A SQL Server Database To A Pocket PC Database
Is it possible to convert a SQL Server database (not all tables of it) directly to a Pocket PC database, using Visual Basic 6?

If not, wat are the alternatives, for example using ODBC, Winsock or some sort of ActiveSync API?

Only Info, When Is It Best To Open Database When You Use Database In Network
HI

I am using database on network and the form is wery slow to work when I need to edit database

I open the database in Form_Load
in the form I use Listview to list database and then Form=edit to edit the data
I use Access / .MDB

Is it som rules how to open database when Form_load and close database when form is finish to load to speen up the program ??




Edited by - ssalomon on 8/11/2003 2:29:31 AM

Addnew And Get Info From Database If The Record Are In The Database HELP
HI


When I put ID number into MaskEdBox1 how can I get info from database if the recort are in the database
I only wand to get the info so I dont need to put the same info into the database agen when I do addnew

Table giro

and
Field
Field1 = Textbox1
Field2 = Textbox2


ssalomon

Kill Process In SQL Database (DATABASE) (URGENT PLZ)
Hello,
I've dead lock on my test database and I can't kill the process even when I'm part of sysadmin.
I've also tried the TSQ-transact Kill #ProcessID but nothing

Does anyone know how to kill the process ID?

Your help would be much appreciated.

Many thanks.

Send Database Info From Vb To Web Database?
How to send some local Access97 records from my PC using VB 6.0 to an Access 97 database hosted in a web place, Could I Use ADO in a Form..? .How do I connect...?

Database Problem For Database Guru`s
Hi Guys,

I would appreciate it very much if someone could help me with the following:

I have created a database application by making use of an Ms Access database format (not ODBC). The application consist of the following:

fMain (Main form)
fTest (Second form)
Database: Database name = UserInfo.mdb
TableName: PersInfo

The table has the following fields: Name, Surname, Gender, Test_Result, Time_of_test, Date_of_test

I have created the first form by making use of the VB Data Form Wizard. Thus, the first page has the following components:

-datPrimaryRS
-picButtons [ New, Add & Proceed buttons]
-three edit boxes were the following must be entered: Name, Surname, Gender


The first form asks the user his personal information like, Name, Surname etc. The user enter his details at the first form (and do not update the database yet) and click on a proceed button to go to the second form. At the second form the user complete a test. After the test is completed, he clicks on a button, btnCompute. The result of the the test are displayed by making use of a label, lblResult.

Now here is were I need help: When the user clicked on the compute button, the results that are displayed by the lblResult (label), must also be written to the database. The database must then be updated so that the final data in the database should look like this:

Name: James
Surname: Bond
Gender: Male
Test Result: 78%

NOTE: As you noticed, the data of the first form (fMain) are part of the data (test result) of the second form (fTest). I need some help on how to do this.

The second problem that I am having is the following:

As part of data in my database, I want to write the system time & date at the moment the update button is clicked. (If possible the system date must also be written to the database) – all together with the details of the user that he have entered at the first form. For example:

Name: James
Surname: Bond
Gender: male
Test Result: 78%
Time test was completed: 09:15
Date: 06/08/2002


I am not really sure how to implement this – would appreciate some ideas…

JUST TO PROOF TO YOU GUYS THAT I HAVE ACCTUALLY TRIED, HERE IS MY CODE – BUT I AM HAVING PROBLEMS WITH IT:

Sub btnCompute_Click

Dim CurrDateTime as Date
Dim NewRec as ADODB.RecordSet

CurrDateTime = Now()
TestRes = <compute test results>
Set NewRec = New ADODB.RecordSet
With NewRec
.ActiveConnection = frmMain.fADO_Connect
.AddNew
.Fields("Name") = frmMain.txtFirstName.Text
.Fields("SurName") = frmMain.txtSurName.Text
<populate the rest of the fields>
.Fields("Results") = lblResult.Caption
.Fields("TimeOfTest") = CurrDateTime
.Update
End With
Set NewRec = Nothing

End Sub

Thanks guys
Regards
C - Power

Database - Writing And Rewriting To Database
I want to write and rewrite from an access database.

to add new details i am using the function:

Code:
datInfo.recordset.edit
is there anyway to get it to add a new line in the database and store all the variables into the specific areas.

i only want to edit ONE line of code each time, what is the code for this?

thanks

dkeegh

How To Convert Old Database To New System With New Database?
Hi, all.
I need your opinions for my project that converting dos-based old system to new system.
I got new project for one factory.
They have DOS based application using VisionPoint and SBT with FoxPro 2.5 database.
When I checked the database files... bunch of .DBF, .CDX, .FPT, .FKY..... files..
I think they used software tool package to develop the application without considering database schema design..
I also couldn't find database file containing whole tables .. I found only table file..
I never used the VisionPoint and SBT as well as FoxPro.
I tried to import the database from SQL server.. but, SQL server ask DSN fileformat. (What is DSN file?)
It didn't work..
I want to use Access and Visual basic for this project. (later on I may move to Sql server, but not now)
I don't know how to convert the old system's database to Access...
I don't know which .DBF table are right tables containing the actual business data or which tables are system house keeping tables..

Please give me any comment if you have any idea for this, if you have done this kind of project, or if you ever converted old system to new system..
If I get exact answer for this situation, it's best.. ( i don't think..i can..)
THis is first time for me to convert old system to new system... (I've done only new systems)
Please provide any idea for this ..

Thank you...

How To Copy A Table In One Database Into Another Database?
Hi all,

I'm trying to insert the contents (column and its data) of table 'Temp3' (just contains one column called 'HLSCODE') in the FAP.mdb to a table 'Temp4' in the HLS.mdb. The table 'Temp4' doesn't exist it is to be created with the SQL code I'm using which is below (I'm using Access 2000) :

SELECT * INTO
C:Program FilesHLSwinHLS.mdb.[Temp4]
FROM C:Program FilesHLSwinFAP.mdb.[Temp3]

When I run this code I get the following RTE '3067' :
"query input must contain at least one table or query"

What am I doing wrong? How do I create 'Temp4' in HLS.mdb with the contents of 'Temp3' from FAP.mdb??

Thanks in advance??

Migrate Acces Database To SQL Database
I use sql server database : "adodao_data.mdf" and tabel name:
"adodao" I wish to use VB6 to connect to table(sql). How to connect to the table ? If any one can pls show me the connection string, and your support is greatly appreciated.

kamus


VB Code:
Private Sub Text1_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenSet objConnection = New ADODB.Connection objConnection.ConnectionString = "Provider=sqloledb;Data Source=pc14;Initial Catalog=dataadodao_Data.MDF;User Id=sa;Password=asdasd;"    objConnection.CursorLocation = adUseClient  objConnection.Open Set objRS = New ADODB.RecordsetobjRS.Open "SELECT * FROM adodao", objConnection, adOpenDynamic, adLockOptimistic



VB Code:
DeclarationPublic objConnection As ADODB.ConnectionDim objRS As ADODB.Recordset

#!Which Is The Best Database For VB6 [n00b Guide To Database]!#
taken from Sams Teach Yourself VB.....

Quote:




Visual Basic supports the following popular database formats:
• Microsoft Access
• dBASE
• FoxPro
• Lotus spreadsheet-based databases
• ODBC-compliant databases
• Paradox
• Text files formatted with comma-delimited data





So these are the databases that can be used within VB... now im no official programmer or something.. im just 14 years but im learnin VB coz i love programming....
I just wanted to know which is the best database that can be used in VB. Well i just know how to use Ms Access Database... idk abt others..So just let me know which database should i use for VB and hey! i dont want it to be too hard for me to learn!

Another question is suppose im using Ms-Access as my database is there anything that i need other than Ms Access itself? any components or something.. pls let me knw abt this too

thx in advance

Transfer Tables From One SQL Database To Another SQL Database
Dear Friends

I am using vb and SQL SERVER-7 database for my project. The database contains more than 150 tables. At the end of financial year i want to transfer some of the tables and some of its contents to another database (which is existing as empty database) by using vb code.

How i transfer tables to another sql db by using vb.

pl help me how to use.

Thanks
bobbytom

Database Gurus: What Kind Of Database Is Right For...
I am developing a 3-tier database application for a library (perhaps a small, mobile library) which is to store info about the literature contained within.

This is the biggest project I have attempted so far, and I have a few questions.

1) Can a 3-tier DB app run on a standalone PC (or is a 2-tier better)

2) What kind of database is best for such a project (I reckon about 20,000 books will be stored in the DB under fields like Author, Publisher, Category etc...)

I will be able to create DB types included in the VB Data Manager Add-in, so things like Microsoft MDB files, Paradox DB's, DBase etc...
The application should preferably be able to run on a small network (with a server) too, but thats not essential.

What do you Database gods think?

Thanks.

Adam

How Do I Copy A Database Object To Another Database?
Greetings everyone,

I have two Microsoft Access databases A.mdb and B.mdb.
(currently using Access 2003)
I would like to programmatically, using Visual Basic, copy
a database object from database A.mdb to database B.mdb.

I'm using the term Database Object to define a:
Table, Query, Form, Report, or Module.

Database A.mdb is behind a firewall on a local area
network and connected to the internet using DSL.


(example url)
Database B.mdb is located at service provider
http://somedomain/databasefiles/A.mdb


Is there a way to do this?
If so what would be the code to perform that action?

Please consider that my goal is to mimic this functionality:

If both databases resided on the same machine and I
had both open to where I could see both Database
Windows open and I dragged a report object from database
A.mdb’s Database Window into database B.mdb’s Database
Window a plus sign would appear indicating that I was about
to copy that Report Object. As soon as I release the mouse
button the object would be copied to the other database.

That’s exactly what I am trying to do programmatically.

I originally tried using the DoCmd.Transferdatabase method, a command that I have used before with great success with copying objects but unfortunately it does not allow for the database name to have http:// at least from what I can been told.

Any help would be greatly appreciated.

Copying A Database Table To Another Database
I was looking fro a way to backup my database from within my program and found this link
http://www.Planet-Source-Code.com/v...Id=540&lngWId=1

The code described there should do the trick. but when I run the program I got a compiler error sayin

Method or datamember not found. and then it points me to this point:

fldTo.DefaultValue = fldFrom.DefaultValue



why?

In Vb Making A Database, Getting Info Out Of Database Ect..
hi, this is my first day working on visual basic. I have many years expreance in HTML, and very little in php. But my question is, i am trying to make a program where people type in inforation then press submit and give each thing a number(the person assignes the number). Then use that number to get the info. This is my first day using visual basic but have about 6 hours in. I havnt found any tutorials, or information that can help me make this program yet. So where should i start, because i think i have a lot of work to do. And do you think i could make this in about a month?

Thanks for you help
-Gary

Copy Records From One Database To Other Database
i have 2 ms access databases, and both containing 1 same strucrured table.
can i copy 1 table's record (from first database) into 2nd table (to second database) directly.

at present i m doing this thing by while loop and adding records 1 by 1. but it takes too long time to copy.

is there any direct way or sql statement, thought which i can directly copy few (selected) records from 1st database's table to second database's table??

regards
bhavesh

SQL Database To Update Access Database
Hi

I have to create a VB project that goes to a remote SQL server and passes any updates to a mailing list into an Access database on a local machine. Im not sure how to do this. I worked on creating a dataadapter, but Im not sure how to pass this over so it can be inserted into the Access database. Also should I use OLE DB for the connection of both? And if I create an exe file would the computer that uses the application have to have the .NET framework installed?
The 2 databases are set up differently so I would have to get only certain fields from the SQL database and I would have to limit the information to only include data where the an update has occured (using a date stamp field).
Any ideas on the best way to do this? Thanks for any advice.

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