上一主题: DataSourceInterface 部分

下一主题: InputFormatCollection 部分

SQL 接口部分

SQL 适配器可用来通过 SQL 语句从数据库中检索数据。

SQL 接口定义了到数据库的连接和用于检索数据的查询,详细信息如下所示:

XML 结构:

	< DataSourceInterface >
		<ConnectionString ConnectionTimeout="60" QueryTimeout="30">
			<![CDATA[ Driver={Microsoft Access Driver (*.mDataBase)};DataBaseq=d:\Oblicore\database1.mdatabase; ]]>
			</ConnectionString>
		<QueryCollection>
		<Query QueryName="cases" InputFormat="cases" SleepTime="3600">
			<SelectStatement AutoCompleteQuery="yes">
			select dateclosed,callid,dateopened,companyname,priority,closedmn,responsemn
			from calls where dateclosed is not NULL
			</SelectStatement>
		<QueryKeyFields>
			<KeyField Name="dateclosed" Sort="asc"/>
			<KeyField Name="callid" Sort="desc"/>
			<SelectInitialValues>
				Select min(dateclosed) , 'min date' from calls
			</SelectInitialValues>
		</QueryKeyFields>
	</Query>
	<Query QueryName="contracts" InputFormat="contracts" SleepTime="3600">
	<ConnectionString>
		<Segment Type="text"
		Text=" Driver={Microsoft Excel Driver (*.xls)}; DriverId=790; DataBaseq="/>
		<Segment Type="File">
		<File Path="d:\Oblicore " NamePattern="Availabilty_*.XLS>
		</Segment>
		<Segment Type="text" Text=";"/>
	</ConnectionString>
<SelectStatement AutoCompleteQuery="yes">….</SelectStatement>
<QueryKeyFields>…..</QueryKeyFields>
</Query>
</QueryCollection>
</DataSourceInterface>