把这段代码写成PAS的语法格式(50分)

  • 主题发起人 主题发起人 linghu
  • 开始时间 开始时间
L

linghu

Unregistered / Unconfirmed
GUEST, unregistred user!
这段代码是系统生成的一个DFM文件中拷贝出来的。<br>怎样把这段代码写成PAS的语法格式;<br> object Connection: TSQLConnection<br> &nbsp; &nbsp;ConnectionName = 'MSSQLConnection'<br> &nbsp; &nbsp;DriverName = 'MSSQL'<br> &nbsp; &nbsp;GetDriverFunc = 'getSQLDriverMSSQL'<br> &nbsp; &nbsp;LibraryName = 'dbexpmss.dll'<br> &nbsp; &nbsp;Params.Strings = (<br> &nbsp; &nbsp; &nbsp;'DriverName=MSSQL'<br> &nbsp; &nbsp; &nbsp;'HostName=server'<br> &nbsp; &nbsp; &nbsp;'DataBase=manger'<br> &nbsp; &nbsp; &nbsp;'User_Name=sa'<br> &nbsp; &nbsp; &nbsp;'Password=123456'<br> &nbsp; &nbsp; &nbsp;'BlobSize=-1'<br> &nbsp; &nbsp; &nbsp;'ErrorResourceFile='<br> &nbsp; &nbsp; &nbsp;'LocaleCode=0000'<br> &nbsp; &nbsp; &nbsp;'MSSQL TransIsolation=ReadCommited'<br> &nbsp; &nbsp; &nbsp;'OS Authentication=True')<br> &nbsp; &nbsp;VendorLib = 'oledb'<br>中间的PARAMS.strings不会<br>只有一部分<br>with &nbsp;Connection do<br> begin<br> &nbsp; &nbsp;ConnectionName := 'MSSQLConnection' ;<br> &nbsp; &nbsp;DriverName:='MSSQL';<br> &nbsp; &nbsp;GetDriverFunc:='getSQLDriverMSSQL';<br> &nbsp; &nbsp;LibraryName:='dbexpmss.dll';<br> &nbsp; &nbsp;PARAMS.strings<br> &nbsp; &nbsp;VendorLib := 'oledb';<br><br> &nbsp; &nbsp;end;
 
已经解决<br> begin<br> &nbsp; &nbsp;ConnectionName := 'MSSQLConnection' ;<br> &nbsp; &nbsp;DriverName:='MSSQL';<br> &nbsp; &nbsp;GetDriverFunc:='getSQLDriverMSSQL';<br> &nbsp; &nbsp;LibraryName:='dbexpmss.dll';<br> &nbsp; &nbsp;with params do<br> &nbsp; &nbsp; begin<br> &nbsp; &nbsp; params.Strings[0]:='DriverName=MSSQL';<br> &nbsp; &nbsp; &nbsp; params.Strings[1]:='HostName=zengkun';<br> &nbsp; &nbsp; &nbsp; params.Strings[2]:='DataBase=renmanger';<br> &nbsp; &nbsp; &nbsp; params.Strings[3]:='User_Name=sa';<br> &nbsp; &nbsp; &nbsp; params.Strings[4]:='Password=newyouth';<br> &nbsp; &nbsp; &nbsp; params.Strings[5]:='BlobSize=-1';<br> &nbsp; &nbsp; &nbsp; params.Strings[6]:='ErrorResourceFile=';<br> &nbsp; &nbsp; &nbsp; params.Strings[7]:='LocaleCode=0000';<br> &nbsp; &nbsp; &nbsp; params.Strings[8]:='MSSQL TransIsolation=ReadCommited';<br> &nbsp; &nbsp; &nbsp; params.Strings[9]:='OS Authentication=True';<br> &nbsp; &nbsp; end;<br><br> &nbsp; &nbsp;VendorLib := 'oledb';<br><br> &nbsp; &nbsp;end;<br>end;
 
后退
顶部