curled close against a pink nose
My yawn makes Newt sneeze.
Just some off-the-cuff observations, and whatnot. Welcome, and enjoy your stay.
'Declarations
option explicit
Private wrkDefault As Workspace
Private dbsNew As Database
Private tdfNew As New TableDef
Private cnn As New ADODB.Connection
Private cmd As New ADODB.Command
Private strcnn As String
Private rs As New ADODB.Recordset
Private sDataBaseName As String
'Code:
'******--------PS: Reference ADO 2.5 and DAO 3.6***********-
Private Sub CreateDB()
On Error GoTo err
sDataBaseName = "c:\NewDB.mdb"
Set wrkDefault = DBEngine.Workspaces(0)
Set dbsNew = wrkDefault.CreateDatabase(sDataBaseName, _
dbLangGeneral, dbEncrypt) 'Create New DataBase
Set dbsNew = wrkDefault.OpenDatabase(sDataBaseName, True, False) 'open the created Database
Set tdfNew = dbsNew.CreateTableDef("NewTable") 'Create Table
With tdfNew
.fields.Append .CreateField("NewField", dbtext) 'Create a new field with text as data type
End With
dbsNew.TableDefs.Append tdfNew 'add the table to the DB
dbsNew.Close 'close database
err:
If err.Number = 3204 Then 'DB exists
Kill sDataBaseName
Resume
End If
End Sub
Private Sub populateDB()
cnn.ConnectionString = "ODBC;DBQ=" & sDataBaseName & ";UID=;PWD=;Driver={Microsoft Access Driver (*.mdb)}"
cnn.open
Set rs = New ADODB.Recordset
strcnn = "SELECT * FROM NewTable"
rs.open strcnn, cnn, adOpenDynamic, adLockOptimistic
rs.addNew
rs.fields("NewField").Value = "Hello"
rs.Update
' To read from the DB into say a textbox named text1
' text1.text=rs.fields("NewField").Value
rs.Close
Set rs = Nothing
cnn.Close
MsgBox "Done. Database can be found at " & sDataBaseName, vbInformation + vbOKOnly
End Sub
'Declarations
'the correctly functionality of code is necessary activate in references of proyect the Microsoft DAO 3.51 LIBRARY
Public db As Database
'Code:
'databas as path of Database
Function OpenDB()As Boolean
On Error GoTo Erroropening
Set db = DBEngine.Workspaces(0).OpenDatabase(databas)
OpenDB = True
Exit Function
Erroropening:
OpenDB = False
MsgBox "Error: " & Err.Number & " - " & Err.Description
End Function
Function CloseDB()As Boolean
On Error GoTo Errorclose
db.Close
Set db = Nothing
closeDB = True
Exit Function
ErrorClose:
CloseDB = False
End Function
"Blood, a hot, sweet, tempered, red humor, prepared in the meseraic veins, and made of the most temperate parts of the chylus (chyle) in the liver, whose office it is to nourish the whole body, to give it strength and color, being dispersed through every part of it. And from it spirits are first begotten in the heart, which afterwards in the arteries are communicated to the other parts.
"Pituita, or phlegm is a cold and moist humor, begotten of the colder parts of the chylus (or white juice coming out of the meat digested in the stomach) in the liver. His office is to nourish and moisten the members of the body.
"Choler is hot and dry, begotten of the hotter parts of the chylus, and gathered to the gall. It helps the natural heat and senses.
"Melancholy, cold and dry, thick, black and sour, begotten of the more feculent part of nourishment, and purged from the spleen, is a bridle to the other two humors, blood and choler, preserving them in the blood, and nourishing the bones.
"An exact balance of the four primary humors makes the justly constituted man, and allows for the undisturbed production of the concoctions or processes of digestion and assimilation."