将VB.Net中的DBF文件结构读取为二进制文件(Reading DBF File Structure in VB.Net as binary file)
我在VB.Net中打开一个DBF作为二进制文件来确定结构。 我必须这样做,因为使用Visual Foxpro OLEDB驱动程序不会返回十进制字段的精度和比例。 我成功地完成了我的任务,没有任何问题。 我遇到的问题是:
字节0是DBF文件类型。
字节1-3是最后更新(yymmdd)。
DBF文件的字节4-7是文件中的记录数。
字节8-9是第一个数据记录的位置。
字节10-11是一个数据记录的长度,包括删除标志。
(此信息来自http://www.dbf2002.com/dbf-file-format.html )以下是我的DBF文件的前32个字节,用连字符分隔:
48-13-2-6-158-0-0-0-168-9-18-3-0-0-0-0-0-0-0-0-0-0-0-0-0- 0-0-0-1-3-0-0
“48”(Hex 30)表示Visual Foxpro
字节1-3表示该文件最后更新于2013年2月6日。
字节4-7表示该文件有158条记录。
所有这些都是正确的。字节8-9是168和9,字节10-11是18和3。
实际记录大小为786字节。 由于有68个字段,第一个数据记录的位置应为(68x32 + 31)= 2207。
我必须做一些转换才能将1689转换为2207和183转换为786吗?
我尝试过十六进制,反之亦然。
I am opening a DBF as a binary file in VB.Net to determine the structure. I have to do it this way since using the Visual Foxpro OLEDB driver does not return the precision and scale of decimal fields. I am succesfully accomplishing my task with no problem. The problem I am having is this:
Byte 0 is the DBF file type.
Bytes 1-3 is the Last Update (yymmdd).
Bytes 4-7 of a DBF file is the Number of records in the file.
Bytes 8-9 is the Position of the first data record.
Bytes 10-11 is the Length of one data record, including the delete flag.
(This information comes from http://www.dbf2002.com/dbf-file-format.html)The following is the first 32 bytes of my DBF file, separated by hyphens:
48-13-2-6-158-0-0-0-168-9-18-3-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-1-3-0-0
The "48" (Hex 30) means Visual Foxpro
Bytes 1-3 say that the file was last updated on 2/6/2013.
Bytes 4-7 say that the file has 158 records.
All of these are correct.Bytes 8-9 are 168 and 9, and Bytes 10-11 are 18 and 3.
The actual record size is 786 bytes. Since there is 68 fields, the position of the first data record should be (68x32+31) = 2207.
Is there some conversion I must do to convert 1689 to 2207 and 183 to 786?
I have tried dec to hex and vice versa.
原文:https://stackoverflow.com/questions/15800991
最满意答案
是的,Azure AD B2C Graph API允许对用户进行CRUD操作。
您可以通过向/ users端点发送“POST”请求来创建用户。
以下文档使用C#编写的“B2CGraphClient”工具来演示这一点: Azure AD B2C:使用Graph (请参阅页面中的GitHub链接以下载示例代码)
请注意,Azure AD B2C中有两种类型的用户帐户:“本地帐户”和“工作或学校帐户”。 所需的参数因您需要的帐户类型而异。
Yes, Azure AD B2C Graph API allows CRUD operations on users.
You can create a user by sending a "POST" request to the /users endpoint.
The following documentation demonstrates this with a "B2CGraphClient" utils written in C# : Azure AD B2C: Use the Graph (see GitHub link in the page to download the sample code)
Please note there are two types of user account in Azure AD B2C : "local accounts" and "work or school accounts". Required parameters vary upon the account type you need.
相关问答
更多-
截至今天,我们建议您使用Azure Active Directory图形API https://graph.windows.net来访问和管理您的B2C租户。 Azure AD B2C:使用Graph API 如果您阅读本文,您可以详细了解AAD和Microsoft Graph API之间的差距: https : //dev.office.com/blogs/microsoft-graph-or-azure-ad-graph 表中的底线表明: 管理B2C租户中的用户(设置本地帐户,登录名) 即将推出(预览) ...
-
从官方Azure AD B2C常见问题解答: https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-faqs 我是否可以配置范围以从各种社交身份提供商处收集有关消费者的更多信息? 不,但这个功能在我们的路线图上。 用于我们支持的社交身份提供者集的默认范围是: Facebook:电子邮件 Google+:电子邮件 Microsoft帐户:openid电子邮件配置文件 亚马逊:简介 LinkedIn:r_ ...
-
如何使用Azure AD B2C获取Facebook个人资料图片(how to get Facebook profile picture using Azure AD B2C)[2021-11-13]
使用自定义策略,您可以检索Facebook用户的图片字段,然后在ID令牌中发出图片声明,如下所示。 1:完成Azure Active Directory B2C:开始使用社交帐户策略之一的自定义策略步骤,例如SocialAndLocalAccounts之一。 2:在扩展文件中声明一个“图片”声明:Picture string -
访问使用Azure AD B2C进行身份验证的用户的LinkedIn API?(Access LinkedIn API for a user authenticated with Azure AD B2C?)[2023-08-14]
目前, Azure AD B2C不支持从社交身份提供商请求任何额外的范围或信息。 Azure AD B2C也无法为您提供社交IdP的令牌,以便您可以向社交IdP查询此信息。 您可以在Azure AD B2C反馈论坛中请求前者或投票选择后者的现有问题:将社交IdP的本机访问权限返回给应用程序 话虽这么说, 您可以通过自定义策略实现检索用户的LinkedIn图片 。 您可以在策略的ClaimsEndpoint值中包含profile-picture (请参阅此文章以供参考: Azure AD B2C Linked ... -
目前,Microsoft没有提供任何信息,因为他们是否会在B2C中提供本地导出功能以允许区域之间的迁移。 但是,您可以根据本指南使用GraphAPI在B2C租户之间导出用户。 此方法对本地帐户的一个问题是密码无法从B2C租户迁移出来,因此您有两个选择: 密码重置 - 您强制每个用户执行密码重置,无论是通过发送给每个用户的电子邮件,还是当用户第一次尝试登录时。 针对旧租户进行验证 - 您可以修改新租户的登录策略,以通过REST API技术配置文件验证用户对旧租户的电子邮件和密码组合。 如果有效,则将密码写入新 ...
-
Azure AD:适用于组织内的用户。 Azure AD B2C:适用于企业应用程序的使用者 你是对的。 但是,Azure AD B2C也基于Azure AD。在您可以创建应用程序或用户或完全与Azure AD交互之前,您将需要Azure AD B2C租户和租户中的全局管理员帐户。因此,Azure AD B2C无法离开Azure AD。 我的申请应该用什么? Azure AD或Azure AD B2C或两者兼而有之?我的用例推荐什么? 根据您的请求,我建议您同时使用Azure AD和Azure AD B2C ...
-
Azure AD B2C尚不支持通过SAML与应用程序/中继方集成。 您可以通过在Azure AD B2C反馈论坛中投票来支持此问题并及时了解其进展情况:( 应用程序)SAML协议支持 。 Azure AD B2C does not support integrating with applications / relaying parties via SAML yet. You can support this ask and keep up to date on its progress by voti ...
-
是否可以使用Azure AD B2C与Instagram连接?(Is it possible to use Azure AD B2C to connect with Instagram?)[2022-07-20]
是的 ,可以使用自定义策略将Azure AD B2C与Instagram连接。 这些策略允许您配置自定义策略设置,该设置可以连接到支持OpenID Connect的任何身份提供程序(任何扩展名都可以通过某些OAuth2.0提供程序)。 只是为了澄清一下,Instagram目前不作为提供商提供支持,但完全可以配置。 今天在Instagram上没有样本可以做到这一点,但我们今天将开始制定自定义政策样本。 观察代码示例 ,我可以更新此答案。 Yes, it is possible to connect Azure ... -
目前,还没有内置支持用户注册审批工作流程。 你可以通过以下方式实现: 具有自定义属性以确定用户是否已被“批准” 。 您可以让用户自行注册,您可以为尚未“批准”的用户创建查询Azure AD Graph的体验或流程,然后批准或删除它们。 建立邀请流程。 当您邀请用户时,您将通过Azure AD Graph创建用户。 然后,您可以将用户引导至密码重置策略作为其“帐户验证”流程。 至于您的定价问题,如果您通过较新的统一注册/登录策略自定义UI,则您只需支付常规Azure AD B2C定价模式 :每个用户在0.00 ...
-
是的,Azure AD B2C Graph API允许对用户进行CRUD操作。 您可以通过向/ users端点发送“POST”请求来创建用户。 以下文档使用C#编写的“B2CGraphClient”工具来演示这一点: Azure AD B2C:使用Graph (请参阅页面中的GitHub链接以下载示例代码) 请注意,Azure AD B2C中有两种类型的用户帐户:“本地帐户”和“工作或学校帐户”。 所需的参数因您需要的帐户类型而异。 Yes, Azure AD B2C Graph API allows CR ...