| 发表于:2007-04-16 14:06:59 楼主 |
private function EXECutesql(byval sql as string) as string dim con as new sqlconnection( "data source=.;integrated security=sspi;initial catalog=marcket ") dim comand as new sqlcommand comand.connection = con comand.commandtext = sql try con.open() dim str as string = comand.EXECutescalar() return str catch ex as exception msgbox(ex.tostring) finally con.close() end try return nothing end function 我用vb做的管理系统在自己的机子上一到open()那条语句就出错,而在学校的机子上却不会。麻烦请高手看一下!谢谢了。 |
|
|
|
|