循环获得几个表名和字段名 [英] get few table name and field name in a loop
问题描述
我正在使用一个函数来备份具有2个字段(P_no,startdate和enddate)的10个表,以供在函数中使用
I''m using a function to backup 10 tables with 2 fields (P_no, and startdate and enddate) to use in a function
If ora.Backup(ls_logid, ls_logpassword, ls_hostring, strPlazaNo, ls_backupdir, ls_startdate, ls_enddate, CheckBox2ID) = True
这是用于备份具有id,passward,path,tablename,field名称(pno和date)的特定文件的语法.
this is is syntax for backup of particular file with id, passward ,path,tablename,field names(pno and date)
s_backupdmp = "exp" + " " + ls_lid + "/" + ls_lpassword & "@" & ls_hostring & " file = " + ls_backupdir + "" + strPNo + "_" + ls_startdate + "_" + ls_enddate + "HQ_CASHDETAIL tables=HQ_CASHDETAIL query = \""where HQRD_PLAZANO = '" + Session("plazano").ToString() + "'" & _
"and HQRD_DATE between to_date('" + ls_startdate + "','ddmmyyyy') and to_date('" + ls_enddate + "','ddmmyyyy')\"""
我尝试将参数(表名称和对应字段除外)放在上面的函数(ora.backup)中,因为有近20个供用户选择的表
复选框1,另外10个复选框2
那么如何在循环中获取具有相应字段名称的表名称,或者如何
请给任何建议或示例,以供您调用函数或如何使用这种从数据库获取值的方法
我正在将Web应用程序VB.NET与oracle数据库一起使用
在此先感谢
i tried to put the parameters In function above(ora.backup) except for table name and corresponding fields ,as there are nearly 20 tables for user selects
checkbox 1 another 10 for checkbox2
so how to get the table name with corresponding field name in a loop or how
kindly any one suggest or give example for calling the function or how to use this kind of getting values from database
i am using web application VB.NET with oracle database
thanks in advance
推荐答案
问题,以使问题本身更加清晰:
您是否在数据库中的某个位置存储了应单击哪个复选框来备份哪些表和字段?
如果没有,则无法循环.
或者也许我错过了一些东西.
Questions to bring some clarity to the question itself:
Have you stored somewhere in the database which tables and fields should be backed up on click of which check box?
If you have not, then you cannot loop.
Or maybe I missed something.
这篇关于循环获得几个表名和字段名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!