program StudentMIS;
uses
Forms,
SysUtiles,
FormMain in 'FormMain.pas' {frmMain},
FormDepartment in 'FormDepartment.pas' {frmDepartment},
{$R *.res}
function SQLConfigDataSource(hwndParent:Integer;
fRequest:LongInt;
lpszDriverString:string;
lpszAttributes:string
):LongBool;Stdcall;External 'ODBCCP32.DLL';
const
ODBC_ADD_DSN=1;
ODBC_CONFIG_DSN=2;
ODBC_REMOVE_DSN=3;
ODBC_ADD_SYS_DSN=4;
ODBC_CONFIG_SYS_DSN=5;
ODBC_REMOVE_SYS_DSN=6;
begin
Application.Initialize;
SQLConfigDataSource(0,ODBC_ADD_SYS_DSN,
'Microsoft Access Driver(*.mdb)',
'DSN=StudentMIS;DBQ='"
+ExtractFilePath(Application.ExeName)+'StudentMIS.MDB";'
+'FIL=MS Access;MaxBufferSize=512;PageTimeout=5;
'+'Description=学生信息管理系统');
Application.CreateForm(TfrmMain, frmMain);
Application.CreateForm(TfrmDepartment, frmDepartment);
Application.Run;
end.
错误类型:
[Error] StudentMIS.dpr(10): Identifier expected but 'FUNCTION' found
[Error] StudentMIS.dpr(24): Undeclared identifier: 'Application'
[Error] StudentMIS.dpr(24): Missing operator or semicolon
[Error] StudentMIS.dpr(27): Illegal character in input file: '"' ($22)
[Error] StudentMIS.dpr(28): Undeclared identifier: 'ExtractFilePath'
[Error] StudentMIS.dpr(28): ')' expected but identifier 'ExeName' found
[Error] StudentMIS.dpr(29): Unterminated string
[Error] StudentMIS.dpr(30): Illegal character in input file: '学' ($D1A7)
[Error] StudentMIS.dpr(30): Illegal character in input file: '系' ($CFB5)
要不要另外一个窗体的代码?