... Set database = OpenDatabase (dbname, options, read-only, connect) Ý ngh a tham số phương thức OpenDatabase sau: Thành phần Ý ngh a database Biến kiểu đối tượng Database mà ta muốn sử dụng dbname ... thông qua DAO cần thông qua đối tượng đối tượng Database Trước tiên ta khai báo đối tượng Database sau: Dim db As Database Đối tượng Database có nhiều phương thức, ta xét qua phương thức quan trọng ... tượng Database, trước sử dụng phương thức này, ta cần khai báo đối tượng Database Chẳng hạn như: Dim Set db As db = Database OpenDatabase(" \ \baigiang.mdb") Cú pháp đầy đủ phương thức OpenDatabase:...
Ngày tải lên: 30/09/2013, 06:20
Data Access Layer
... } return dataReader; } private User CreateUserFromReader(IDataReader dataReader) { int id = dataReader.GetInt32(0); string name = dataReader.GetString(1); string emailAddress = dataReader.GetString(2); ... } } private IDataReader ExecuteReadCommand(IDbCommand command) { IDataReader dataReader = null; if (_databaseConnection.State == ConnectionState.Open) { dataReader = command.ExecuteReader(); ... CHAPTER ■ DATA ACCESS LAYER The common data (the Customer’s Name, EmailAddress, and Password) have been extracted and placed into a superclass called User, which is marked as abstract and cannot...
Ngày tải lên: 03/10/2013, 01:20
Data Access and Networking
... 146 CHAPTER ■ DATA ACCESS AND NETWORKING ... < /data: DataGridTemplateColumn.CellTemplate> < /data: DataGridTemplateColumn> 11 Save the MainPage.xaml file and navigate to the code behind for the application, located in the MainPage.xaml.cs file Wire up the Loaded event handler...
Ngày tải lên: 05/10/2013, 03:20
Introduction to Data Access
... integrate databases and applications: • There are as many SQL dialects as there are database vendors Almost all relational databases require the use of SQL to add data to tables and read, modify, and ... repository adapter The repository adapter is an integration pattern between application code and relational databases It abstracts some data- access details from application code by declaring data- access ... generic transaction-management API While the JTA may not be suitable for our needs—we want to avoid leakage of data- access and transaction-management details—an abstract transaction management API...
Ngày tải lên: 05/10/2013, 04:20
Data Access
... a DataSet class with data from a relational database System .Data. DataSet An in-memory representation of a database that can contain tables and relationships between them; unlike the other class ... Microsoft.Practices.EnterpriseLibrary .Data let execCommand< 'a> commandString : seq< 'a> = let opener() = let database = DatabaseFactory.CreateDatabase() database.ExecuteReader(CommandType.Text, commandString) ... System .Data open System.Windows.Forms open Microsoft.Practices.EnterpriseLibrary .Data let opener commandString = let database = DatabaseFactory.CreateDatabase() database.ExecuteReader(CommandType.Text,...
Ngày tải lên: 05/10/2013, 10:20
... in callInfo.inparams, which is a Python list of ParameterInfo objects that hold information about each parameter Each ParameterInfo object contains a name attribute, which is the argument name ... search words The doGoogleSearch function takes a number of parameters of various types Note that while the WSDL file can tell you what the arguments are called and what datatype they are, it can't ... need to pass the exact datatypes that the server expects Again, the server returns a SOAP Fault, and the human-readable part of the error gives a clue as to the problem: you're calling a getTemp...
Ngày tải lên: 17/10/2013, 19:15
Dive Into Python-Chapter 13. Unit Testing
... uppercase Roman numerals (i.e it should fail when given lowercase input) In fact, they are somewhat arbitrary You could, for instance, have stipulated that fromRoman accept lowercase and mixed case ... integer in range(1, 4000): numeral = roman.toRoman(integer) roman.fromRoman(numeral.upper()) self.assertRaises(roman.InvalidRomanNumeralError, roman.fromRoman, numeral.lower()) if name == " main ": ... integer/numeral pairs that I verified manually It includes the lowest ten numbers, the highest number, every number that translates to a single-character Roman numeral, and a random sampling of other valid...
Ngày tải lên: 20/10/2013, 10:15
Dive Into Python-Chapter 14. Test-First Programming
... the trace information showing exactly what happened In this case, the call to assertRaises (also called failUnlessRaises) raised an AssertionError because it was expecting toRoman to raise an OutOfRangeError ... not pass When a test case doesn't pass, unittest distinguishes between failures and errors A failure is a call to an assertXYZ method, like assertEqual or assertRaises, that fails because the asserted ... was a failure, because the call to fromRoman did not raise the InvalidRomanNumeral exception that assertRaises was looking for 14.2 roman.py, stage Now that you have the framework of the roman...
Ngày tải lên: 20/10/2013, 10:15
Dive Into Python-Chapter 15. Refactoring
... 'LC'): self.assertRaises(roman71.InvalidRomanNumeralError, roman71.fromRoman, s) def testBlank(self): """fromRoman should fail with blank string""" self.assertRaises(roman71.InvalidRomanNumeralError, ... testFromRomanKnownValues result = roman71.fromRoman(numeral) File "roman71.py", line 47, in fromRoman raise InvalidRomanNumeralError, 'Invalid Roman numeral: %s' % s InvalidRomanNumeralError: Invalid ... NotIntegerError(RomanError): pass class InvalidRomanNumeralError(RomanError): pass #Roman numerals must be less than 5000 MAX_ROMAN_NUMERAL = 4999 #Define digit mapping romanNumeralMap = (('M', 1000),...
Ngày tải lên: 24/10/2013, 09:15
Dive Into Python-Chapter 16. Functional Programming
... always contain the name of the script, exactly as it appears on the command line This may or may not include any path information, as you'll see shortly os.path.dirname takes a filename as a string ... os.getcwd() Calling os.path.abspath with a partial pathname constructs a fully qualified pathname out of it, based on the current working directory Calling os.path.abspath with a full pathname simply ... pathname, which can be partial or even blank, and returns a fully qualified pathname os.path.abspath deserves further explanation It is very flexible; it can take any kind of pathname Example 16.4...
Ngày tải lên: 24/10/2013, 09:15
Dive Into Python-Chapter 17. Dynamic functions
... called map(buildMatchAndApplyFunctions, patterns), that means that buildMatchAndApplyFunctions is not getting called with three parameters Using map to map a single list onto a function always ... local variables And then you yield What you yield? A function, built dynamically with lambda, that is actually a closure (it uses the local variables pattern, search, and replace as constants) In ... buildMatchAndApplyFunctions that I skipped over Let's go back and take another look Example 17.13 Another look at buildMatchAndApplyFunctions def buildMatchAndApplyFunctions((pattern, search, replace)):...
Ngày tải lên: 28/10/2013, 16:15
Dive Into Python-Chapter 18. Performance Tuning
... must always be balanced against threats to your program's readability and maintainability 18.7 Summary This chapter has illustrated several important aspects of performance tuning in Python, and ... B maps to 1, C maps to 2, and so forth But it's not a dictionary; it's a specialized data structure that you can access using the string method translate, which translates each character into ... if a name was misspelled, researchers had a chance of finding it Soundex is still used today for much the same reason, although of course we use computerized database servers now Most database...
Ngày tải lên: 28/10/2013, 16:15
Module 9: The Transactional Data Access Layer
... Business Logic Layer DAL Data Services Transactional DAL Nontransactional DAL The transactional DAL facilitates both the retrieval and the modification of data in various formats: database, Active Directory™, ... will learn what makes up a transactional DAL Transactional data access allows facade layer objects and business logic objects to manipulate data from the underlying data storage systems All of ... modules that focus on the data access layer (DAL) In Module 8, “The Nontransactional Data Access Layer,” you learned about data retrieval In this module, you will learn about data manipulation After...
Ngày tải lên: 05/11/2013, 12:15
Dive Into Python-Chapter 1. Installing Python
... RedHat Linux Installing under UNIX-compatible operating systems such as Linux is easy if you're willing to install a binary package Pre-built binary packages are available for most popular Linux ... You can also assign values to variables, and the values will be remembered as long as the shell is open (but not any longer than that) 1.9 Summary You should now have a version of Python installed ... It's an interpreter for scripts that you can run from the command line or run like applications, by double-clicking the scripts But it's also an interactive shell that can evaluate arbitrary statements...
Ngày tải lên: 07/11/2013, 10:15
Dive Into Python-Chapter 2. Your First Python
... requiring you to declare all variables with their datatypes before using them Java and C are statically typed languages dynamically typed language A language in which types are discovered at execution ... dynamically typed (because it doesn't use explicit datatype declarations) and strongly typed (because once a variable has a datatype, it actually matters) 2.3 Documenting Functions You can document ... statically typed VBScript and Python are dynamically typed, because they figure out what type a variable is when you first assign it a value strongly typed language A language in which types are...
Ngày tải lên: 07/11/2013, 10:15
Dive Into Python-Chapter 3. Native Datatypes
... you can pass other parameters to specify a base other than and a step other than You can print range. doc for details.) MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, and SUNDAY are ... Python keeps track of the datatype internally A list in Python is much more than an array in Java (although it can be used as one if that's really all you want out of life) A better analogy would ... being assigned a value, and they are automatically destroyed when they go out of scope Example 3.17 Defining the myParams Variable if name == " main ": myParams = {"server":"mpilgrim", \ "database":"master",...
Ngày tải lên: 07/11/2013, 10:15
A contrastive investigation into linguistic features of socio cultural propaganda slogans in english and vietnamese
... the aims as well as the formats of propaganda slogans in English and Vietnamese are partially similar, their grammatical, semantic, and pragmatic features are different to a certain degree As an ... making them believe in some claims Through slogans, all of them draw people’s attention to a general viewpoint of an organization or a government 2.2.3 LANGUAGE OF PROPAGANDA Propaganda language ... slogans 1.3.2 Objectives - Analyze the nature of propaganda slogans - Describe and comment on the grammatical, semantic, and pragmatic features of S.C.P.Ss in English and Vietnamese - Compare and...
Ngày tải lên: 26/11/2013, 13:30
Tài liệu java Data Access JDBC, JNDI, and JAXP pptx
... object−relational databases are relational databases that treat objects as new data types Naming and directory services Naming and directory services are hierarchical (not relational) databases optimized ... encapsulation of the user−defined data types Some support SQL while others have proprietary access languages • Object−relational database — A cross between an object database and a relational database ... database types available: • Relational database — Stores all data in tables, among which you can define relationships in order to model most real−world processes By default, relational databases...
Ngày tải lên: 10/12/2013, 02:15
Tài liệu Module 3: Using a Conceptual Design for Data Requirements docx
... the solution’s overall data design If a solution has no data requirements, it has no need for data storage, let alone a logical data organization Determining the functional data requirements from ... to perform a function or task Each functional data requirement is directly traceable to an actor and an object within a use case Nonfunctional data requirements A nonfunctional data requirement ... The logical and physical implementation of a database necessitates that the data requirements be defined What types of data (at a high level) are going to be stored? " Explicit The data requirements...
Ngày tải lên: 10/12/2013, 17:15
Tài liệu Bài 6: Data Access and Viewingwith .NET docx
... OleDbDataAdapter, SqlDataReader, OleDbDataReader, SqlParameter, OleDbParameter, SqlTransaction, OleDbTransaction Data Access and Viewing with NET Editor: Đoàn Quang Minh Đoà Using Database Connections ... conn); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = cmd; DataSet data = new DataSet(); try { conn.Open(); adapter.Fill (data) ; } catch (SqlException expSQL) { } finally { ... DataAdapter, định câu lệnh truy vấn cho data adapter – Tạo data set – Sử dụng phương thức Fill() data adapter Xây dựng cách thêm data table – Tạo DataSet – Tạo DataTable Khởi tạo data table cách...
Ngày tải lên: 13/12/2013, 09:16