關於Data Shaping技術,特急!!

Jameszht 2002-05-13 05:03:58
我的工程用到data shaping.

數據源的提供者應是MsDataShape,但是在connecton.open中,系統提示,不能初始化數據源.

如果提供者是sqloledb.1,在recordset.open中則提示語法錯誤。請在這方面有經驗的同志們給予幫助.
...全文
47 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Jameszht 2002-05-13
  • 打赏
  • 举报
回复
up
Jameszht 2002-05-13
  • 打赏
  • 举报
回复
但是系統不能初始化MSDateShape數據源,是怎麼回事?
kevincomein 2002-05-13
  • 打赏
  • 举报
回复
以下范例说明了访问分级 Recordset 中的行的所需步骤:

authors 和 titleauthors 表中的 Recordset 对象通过 author ID 进行关联。


外循环显示每个作者的姓名、州/省别和身份。


每行所追加的 Recordset 都从 Fields 集合进行检索并分配给 rsChapter。


内循环显示追加的 Recordset 中每行的四个字段。
范例

Sub datashape()
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
Dim rsChapter As Variant

cnn.Provider = "MSDataShape"
cnn.Open "Data Provider=MSDASQL;" & _
"DSN=vfox;uid=sa;pwd=vfox;database=pubs”
'步骤 1
rst.StayInSync = FALSE
rst.Open "SHAPE {select * from authors}
APPEND ({select * from titleauthor} AS chapter
RELATE au_id TO au_id)",
cnn
'步骤 2
While Not rst.EOF
Debug.Print rst("au_fname"), rst("au_lname"),
rst("state"), rst("au_id")
'步骤 3
Set rsChapter = rst("chapter")
'步骤 4
While Not rsChapter.EOF
Debug.Print rsChapter(0), rsChapter(1),
rsChapter(2), rsChapter(3)
rsChapter.MoveNext
Wend
rst.MoveNext
Wend
End Sub

Analyzing Data with Power BI and Power Pivot for Excel (Business Skills) by Alberto Ferrari English | 25 Apr. 2017 | ASIN: B0713N6BBW | 256 Pages | AZW3 | 21.78 MB Renowned DAX experts Alberto Ferrari and Marco Russo teach you how to design data models for maximum efficiency and effectiveness. How can you use Excel and Power BI to gain real insights into your information? As you examine your data, how do you write a formula that provides the numbers you need? The answers to both of these questions lie with the data model. This book introduces the basic techniques for shaping data models in Excel and Power BI. It’s meant for readers who are new to data modeling as well as for experienced data modelers looking for tips from the experts. If you want to use Power BI or Excel to analyze data, the many real-world examples in this book will help you look at your reports in a different way–like experienced data modelers do. As you’ll soon see, with the right data model, the correct answer is always a simple one! By reading this book, you will: • Gain an understanding of the basics of data modeling, including tables, relationships, and keys • Familiarize yourself with star schemas, snowflakes, and common modeling techniques • Learn the importance of granularity • Discover how to use multiple fact tables, like sales and purchases, in a complex data model • Manage calendar-related calculations by using date tables • Track historical attributes, like previous addresses of customers or manager assignments • Use snapshots to compute quantity on hand • Work with multiple currencies in the most efficient way • Analyze events that have durations, including overlapping durations • Learn what data model you need to answer your specific business questions About This Book • For Excel and Power BI users who want to exploit the full power of their favorite tools • For BI professionals seeking new ideas for modeling data

1,488

社区成员

发帖
与我相关
我的任务
社区描述
VB API
社区管理员
  • API
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧