如何将.asp代码转换为c#代码 [英] How can i convert .asp code into c# code
本文介绍了如何将.asp代码转换为c#代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
errstr = ""
rs.MoveFirst
Do Until rs.EOF
errstr = errstr & rs.Fields("FILENAME") & ","
rs.MoveNext
Loop
Display_Error "Import Existing BO/POA - DPA5/DPE4","BO/POA success/failure response file for exported filename/s <br> " & Mid(errstr,1,len(errstr)-1) & "<br> has not been imported. Cannot proceed. "
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open dsn
Conn.BeginTrans
sqlstmt = " Select To_Number(Value) + 1 Ex_id From ControlFile Where col_Name = 'EXIM_DETAILS' "
set rs1 = server.createObject("ADODB.Recordset")
rs1.Open sqlstmt, dsn, 3, 3
ex_id = rs1.Fields("EX_ID")
rs1.Close
set rs1 = nothing
sqlstmt =" Update ControlFile Set Value = " & Ex_id & " Where col_name = 'EXIM_DETAILS' "
Conn.Execute sqlstmt
sqlstmt =" Insert Into Exim_Details(Id, User_Name, " &_
" Exim_Module, Date_Of_Exim, Time_Of_Exim, Err_Description) " &_
" Values ( " & ex_id & ", " & t_usr_id & ", " &_
" 'm_imp_dpb9' , SysDate, " &_
" To_char(sysdate,'HH:MI:SS'), 'BO success/failure response file for exported filename/s " & Mid(errstr,1,len(errstr)-1) & " has not been imported. Cannot proceed.') "
Conn.Execute sqlstmt
Conn.CommitTrans
Conn.close
Set Conn = nothing
我有以上代码我想转换成asp.net(c#)
可以帮到任何人。
从下面的评论中复制的其他信息
谢谢。
i只想转换
I have above code i want to convert into asp.net (c#)
can anybody help out.
additional information copied from comment below
Thanks.
i just want to convert
Do Until rs.EOF
errstr = errstr & rs.Fields("FILENAME") & ","
rs.MoveNext
Loop
来做c#中的while循环可以帮忙吗?
to do while loop in c# can u help out?
推荐答案
这样的工具几乎不可能,或者它不是真正有用,因为这两种技术太不同了。您应该按照这篇内容丰富的文章中的建议进行操作。
http://msdn.microsoft.com/en-us/library/ms973813.aspx [ ^ ]
Such tool is hardly possible, or it could not be really useful, as those two technologies are too different. You should follow the recommendations give in this very informative article.
http://msdn.microsoft.com/en-us/library/ms973813.aspx[^]
检查一下
.NET代码转换 - 转换代码 [ ^ ]
这篇关于如何将.asp代码转换为c#代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文