<p>I'm trying to connect to a .accdb database and I can't get the connection right. My googling has lead me to ADODB or ODBC for the connection. I'm stumped. I've tried:
mattn/go-adodb and alexbrainman/odbc without success.</p>
<p>OS: Windows 10
Go: 1.9</p>
<p>Any pointers to get me on track would be greatly appreciated.</p>
<hr/>**评论:**<br/><br/>kostix: <pre><p>A pattern which works in cases like this is as follows:</p>
<ol>
<li>Reasearch any information on how to connect to an MS Access DB
using <em>whatever the Microsoft supplies</em> and the technology of your choice.
Say, if you need ODBC, search the internets for "ODBC+MS+Access".</li>
<li>Research the examples in the library you want to use (say Alex Bainman's <code>odbc</code> package.</li>
<li>Combine the two.</li>
</ol>
<hr/>
<p>Also please note that stating "I've tried … without success"
is no different than stating "Please give me the working code".
That's not how things work; you should share the code of your attempt(s) and state explicitly what, and how, failed.</p></pre>_clintm_: <pre><p>when you say they didn’t work what do you mean?</p></pre>BriarBeard: <pre><p>I just don’t know where to start. I have no problems making SQLite dB connections but do not know the proper way to connect to an access DB. </p>
<p>*edit for typos</p></pre>_clintm_: <pre><p>Gotcha... did you install the ODBC driver?
<a href="https://youtu.be/biSjA8ms_Wk" rel="nofollow">https://youtu.be/biSjA8ms_Wk</a></p></pre>shovelpost: <pre><blockquote>
<p>I'm trying to connect to a .accdb database and I can't get the connection right.</p>
</blockquote>
<p>A little more information about the problem would really help people help you.</p>
<p>What have you tried? What errors do you get? Minimum example of code that isolates the problem?</p></pre>BriarBeard: <pre><p>I’ve used the golang sql library to connect to SQLite with no problems. I don’t know where to start when trying to connect to a MS Access DB.</p></pre>shovelpost: <pre><p>Did you try to follow the <a href="https://github.com/mattn/go-adodb/blob/master/_example/mdb.go" rel="nofollow">example</a>?</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传