Conect to an Access databaseDim objConn As New ADODB.Connection objConn.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;"_&; "Data Source =C:sampledatabase.mdb"objConn.open

| عنوان | پاسخ | بازدید | توسط |
| |
0 | 3001 | admin |
| |
0 | 1856 | admin |
| |
0 | 3907 | admin |
| |
0 | 2224 | admin |
| |
0 | 1998 | admin |
Conect to an Access databaseDim objConn As New ADODB.Connection objConn.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;"_&; "Data Source =C:sampledatabase.mdb"objConn.open
Conect to an Access databaseDim objConn As New ADODB.Connection objConn.ConnectionString = "Provider = Microsoft.Jet.OLEDB.4.0;"_&; "Data Source =C:sampledatabase.mdb"objConn.open
An Example of Exception Handling
#include <;iostream>
using namespace std;int main(){ unsigned int TypeOfLoan = 0; const char *LoanType[] = { "Personal", "Car", "Furniture", "Musical Instrument","Boat" };
try { cout <;< "Enter the type of loann";for(int i = 0; i < 4; i++)
cout <;< i + 1 << ") " << LoanType[i] << endl; cout <;< "Your choice: "; cin >;> TypeOfLoan;if( TypeOfLoan <; 1 || TypeOfLoan > 5 )
throw "Number out of rangen";
cout << "nType of Loan: " << LoanType[TypeOfLoan] << endl;}
catch(const char* Msg) { cout <;< "Error: " << Msg << endl;}
catch(...)
{ cout <;< "nSomething went wrongnn";}
return 0;
}/*
BubbleSort.h
USAGE:
create an integer array and determine the amount of elements in thearray. then Call BubbleSort with the array's pointer and the amount of
elements in the array. BubbleSort will then return a pointer to a sorted
array.
John Shao
********************************************************************************
This work is hereby released into the Public Domain. To view a copy of thepublic domain dedication, visit
http://creativecommons.org/licenses/publicdomain/
or send a letter toCreative Commons
559 Nathan Abbott Way
Stanford, California 94305
USA.
*******************************************************************************/
int* BubbleSort(int* arr,int size)
{ int swap; while(size>0) {for(int i=0;i<size-1;i++)
{if(arr[i]>;arr[i+1])
{ swap=arr[i]; arr[i]=arr[i+1]; arr[i+1]=swap; }}
--size; }return arr;
}/******************************************************************************/
/* The Following is a Test Program */
/******************************************************************************/
/*
#include<;iostream>int main()
{ int*data=new int[10]; for(int i=0;i<10;i++) { std::cout<;<'>'; std::cin>;>data[i]; std::cin.get(); }data=BubbleSort(data,10);
for(int i=0;i<10;i++) std::cout<;<data[i]<<' '; std::cout<;<std::flush; std::cin.get(); delete [] data;return 0;
}*/
تعداد صفحات : 87