首页 \ 问答 \ C#读/写Access DB文件(C# Read/Write into Access DB File)

C#读/写Access DB文件(C# Read/Write into Access DB File)

我想使用C#应用程序写入Access数据库文件,可能使用WPF ...我也希望文件受密码保护...是否可以在密码保护时连接到它或者我应该删除密码?


I want to write into Access Database File using C# Application, probably using WPF ... I also want the file to be password protected ... is it possible to connect to it while it is password protected or should I remove the password?


原文:https://stackoverflow.com/questions/3228478
更新时间:2022-08-11 15:08

最满意答案

一些想法,虽然不一定完整(你的问题有很多,但希望这些要点有帮助):

  • 我认为您不需要跟踪剩余的交货情况。 您只有2个选项 - 一次性订单或定期订单。 在这两种情况下,计算剩余交货都没有意义。 它永远不会被利用。

  • 在跟踪下一个交货日期方面,您可以跟踪订单的当天。 如果它是经常性的 - 每月或每周,无论如何 - 一切都可以从第一次开始算起。 大多数数据库系统(MySQL,SQL Server,Oracle等)都支持足够的日期计算灵活性,因此您可以动态计算,而不是维护这样一个已知的计划。

  • 如果交货地点仅限于订单,我认为没有必要为它创建一个单独的表 - 它在功能上取决于订单,您应该将它与订单保持在同一个表中。 对于大多数电子商务系统而言,情况并非如此,因为他们倾向于将交付地点列表与帐户相关联,这些帐户会在您多次订购时提示您(例如,亚马逊)。

  • 考虑到上述情况,我打赌你可以在上面的4个表中找到2个 - 账户和订单。 但同样,如果交付地点与账户相关联,我的确会打破这一点。 (但你上面的问题并没有暗示)

  • 不要用“_test”后缀命名你的表 - 这很令人困惑。


A few thoughts, though not necessarily complete (there's a lot to your question, but hopefully these points help):

  • I don't think you need to keep track of remaining deliveries. You only have 2 options - a one time order, or a recurring order. In both cases, there's no sense in calculating remaining deliveries. It's never leveraged.

  • In terms of tracking the next delivery date, you can just keep track of the day of the order. If it's recurring -- monthly or weekly, regardless -- everything is calculable from that first date. Most DB systems (MySQL, SQL Server, Oracle, etc) support more than enough date computation flexibility so that you can calculate this on the fly, as opposed to maintaining such a known schedule.

  • If the delivery location is only specific to the order, I see no use in creating a separate table for it -- it's functionally dependent on the order, you should keep it in the same table as the order. For most e-commerce systems, this is not the case because they tend to associate a list of delivery locations with accounts, which they prompt you about when you order more than once (e.g., Amazon).

  • Given the above, I bet you can just get away with 2 of your 4 tables above -- Account and Order. But again, if delivery locations are associated with Accounts, I would indeed break that out. (but your question above doesn't suggest that)

  • Do not name your tables with a "_test" suffix -- it's confusing.

相关问答

更多
  • 我的SQL不是以前的版本,但我相信对于纯粹的SQL解决方案,它需要看起来像这样: SELECT "users".* FROM "users" LEFT JOIN orders on orders.user_id = users.id LEFT JOIN orders non_errored_orders on non_errored_orders.user_id = users.id and non_errored_orders.state <> 'errored' WHERE "non_ ...
  • 我终于解决了这个问题: List orders = RemoteServiceFactory.getOrderRemoteService().list(); for (Order order : orders) { Order orderInfo = RemoteServiceFactory.getOrderRemoteService().getById(order.getId()); List items = orderInfo.getItems(); ...
  • 您可以使用带有$pagenow全局变量的parse_query过滤器来删除Free命令。 add_filter('parse_query', 'wh_alterAdminPostList'); function wh_alterAdminPostList($query) { global $pagenow; if (is_admin() && $pagenow == 'edit.php' && isset($_GET['post_type']) && $_GET['post_type'] ...
  • private static readonly Object obj = new Object(); lock (obj) { ..... } 这有效! 谢谢。 private static readonly Object obj = new Object(); lock (obj) { ..... } This works! Thanks.
  • 一些想法,虽然不一定完整(你的问题有很多,但希望这些要点有帮助): 我认为您不需要跟踪剩余的交货情况。 您只有2个选项 - 一次性订单或定期订单。 在这两种情况下,计算剩余交货都没有意义。 它永远不会被利用。 在跟踪下一个交货日期方面,您可以跟踪订单的当天。 如果它是经常性的 - 每月或每周,无论如何 - 一切都可以从第一次开始算起。 大多数数据库系统(MySQL,SQL Server,Oracle等)都支持足够的日期计算灵活性,因此您可以动态计算,而不是维护这样一个已知的计划。 如果交货地点仅限于订单,我 ...
  • 好。 你需要完全重新考虑这一点。 您应该有一个单独的表格,以便您可以获得更详细的信息。 应该有一个表格: 订单 - 带有order_id,订单的时间/日期戳,买家是谁,卖家是谁,付款方式是什么,产品是什么,价格是多少 买家 - 在订单中引用。 在这里,您可以找到每位买家的所有相关信息。 以这种方式,买方是否是注册用户并不重要,因为将有两个字段:buyer_id和user_id。 如果买方不是注册用户......则该字段将为空白。 然后您将获得该买家购买的参考,其余大部分将在订单中找到 卖家 - 卖家,当然, ...
  • 从Employees加入Orders并使用左连接而不是内部(或者在编写时仍然从Orders到Employees - 但在这种情况下使用右连接)。 还删除having count(Orders.OrderID) >= 0; 多余的条件(我无法想象你的场景中的负数计数): select Employees.FirstName, count(Orders.OrderID) as "Amount of Orders" from Employees left outer join Orde ...
  • 通过ListOrders获取订单似乎有许多陷阱。 以下是MWS支持人员的回复, 请注意,只有在清除了一些内部检查(主要是欺诈性订单)时,订单才会填充在ListOrders数据中。 这意味着在创建订单之间以及在API查询中显示订单时(或者在SellerCentral中,就此而言)会有延迟。 这种延迟通常是几分钟,偶尔半小时, 很少是几个小时 。 并且一些订单可以很快从待处理状态转移到未处理状态。 订单ID ---仅处于挂起状态7秒,您所做的所有请求都是在此订单实际可用于在ListOrders中填充API之前。 ...
  • 您正在寻找提供给多个用户的IP? 然后按IP分组并统计不同的用户。 select ip from mytable group by ip having count(distinct user_id) > 1; 编辑:获取与之关联的用户 select user_id, ip from mytable where ip in ( select ip from mytable group by ip having count(distinct user_id) > 1 ); 这与EXISTS条 ...
  • 你应该像这样链接你的发现,然后用户只能看到他/她自己的订单。 def show @food_order = @client.food_orders.find_by(id: params[:id]) redirect_to root_path if @food_order.nil? end You should chain your finds like this, then the user can only see his/her own orders. def show @food_or ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。