jet

get column names Jet OLE DB in vb.net

心不动则不痛 提交于 2019-12-02 00:43:29
I've written a function which reads csv files and parametrizes them accordingly, therefore i have a function gettypessql which queries sql table at first to get data types and therefore to adjust the columns which are later inserted in sql. So my problem is when I set HDR=Yes in Jet OLE DB I get only column names like F1, F2, F3. To circumvent this issue I've set HDR=No and written some for loops but now I get only empty strings, what is actually the problem? here is my code: Private Function GetCSVFile(ByVal file As String, ByVal min As Integer, ByVal max As Integer) As DataTable Dim ConStr

Get all field names in Microsoft Access Table using SQL

你。 提交于 2019-12-02 00:03:37
How do I get all the field names in a Table in Microsoft Access using JET SQL? Thanks all I was making using of the ODBC extension in PHP and it has a function to do this! In case anyone needs this in the future its, odbc_tables ! 来源: https://stackoverflow.com/questions/2221250/get-all-field-names-in-microsoft-access-table-using-sql

Ambiguous left joins in MS Access

牧云@^-^@ 提交于 2019-12-01 23:41:13
I want to convert the following query from T-SQL SELECT * FROM A LEFT JOIN B ON A.field1 = B.field1 LEFT JOIN C ON C.field1 = A.field2 AND C.field2 = B.field2 to Jet SQL. Now MS Access does not accept ambiguous queries. How can I do that? I can't put the second comparison in the WHERE clause. Why? Because my scenario is that I am selecting records that does not exist in C. How to select all records from one table that do not exist in another table? Now, how do you that in MS Access? Thanks in advance for your time and expertise. You need a derived table to make this work in MS Access: SELECT *

Ambiguous left joins in MS Access

独自空忆成欢 提交于 2019-12-01 23:37:33
问题 I want to convert the following query from T-SQL SELECT * FROM A LEFT JOIN B ON A.field1 = B.field1 LEFT JOIN C ON C.field1 = A.field2 AND C.field2 = B.field2 to Jet SQL. Now MS Access does not accept ambiguous queries. How can I do that? I can't put the second comparison in the WHERE clause. Why? Because my scenario is that I am selecting records that does not exist in C. How to select all records from one table that do not exist in another table? Now, how do you that in MS Access? Thanks in

Undefined function 'Replace' in expression

自闭症网瘾萝莉.ら 提交于 2019-12-01 20:20:32
I am having a VB.Net application. I connect it with a MS Access database. Now I have to execute a query. My query is : Update table1 set field1=replace(field1,'|','"') This query seems to work fine from the query analyzer of the Access database but when I do the same form the VB.Net code it throws me an error stating "Undefined function 'Replace' in expression" I am using OLEDB connection and command. I am using the "executenonquery" feature. Can any one help me? Unfortunately when you connect to an Access database from you VB.Net application you aren't using the Access query engine at all.

将写好的Java程序生成在任何Windows机器上均可执行的.exe文件

泄露秘密 提交于 2019-12-01 19:12:16
准备工作: 一、将你的Java项目进行打包,有这种将项目生成Jar包的Eclipse的插件(Build Fat Jar); 二、准备好你的图标文件(.ico文件),如果没有可以去http://www.ico.la/用普通图片在线制作; 三、下载jet-760-eval-en-windows-x86.rar 大小:76.5MB。安装后运行进入首页面: 1、点击 ,这一项是对桌面应用程序,也就是J2SE的程序生成.exe文件; 2、 这是选择你的工作目录,也就是待会生成的一系列文件存放的地方; 3、 将选择工作目录旁边的复选框勾选上,然后就会出现第四步的图标; 4、点击 选择你刚才生成的Jar包的路径; 5、 选择你的程序入口,即:主类; 6、点击 进入下一步; 7、 这里点击Run它会试运行一下,也可以帮助你检测一下是否能正常运行; 8、 这里输入最终生成exe文件的文件名; 9、 添加版本和版权信息 10、 11、 选择.exe文件的图标 12、 建议勾选上,不然生成的.exe程序一运行就会弹出一个dos的窗口; 13、 这里是选择你的程序运行前的一个欢迎界面之类的东西,选择一张图片,下面的复选框是一些隐藏欢迎界面的触发操作; 14、 好了,点击Build就可以等待.exe程序的生成啦!最好先把其它进程都结束了,至少留1200MB的内存,这一步操作太吃内存了!不然你会等很久才能完成

VBA: Querying Access with Excel. Why so slow?

谁都会走 提交于 2019-12-01 17:22:14
I found this code online to query Access and input the data into excel (2003), but it is much slower than it should be: Sub DataPull(SQLQuery, CellPaste) Dim Con As New ADODB.Connection Dim RST As New ADODB.Recordset Dim DBlocation As String, DBName As String Dim ContractingQuery As String If SQLQuery = "" Then Else DBName = Range("DBName") If Right(DBName, 4) <> ".mdb" Then DBName = DBName + ".mdb" DBlocation = ActiveWorkbook.Path If Right(DBlocation, 1) <> "\" Then DBlocation = DBlocation + "\" Con.ConnectionString = DBlocation + DBName Con.Provider = "Microsoft.Jet.OLEDB.4.0" Con.Open Set

VBA: Querying Access with Excel. Why so slow?

て烟熏妆下的殇ゞ 提交于 2019-12-01 16:15:12
问题 I found this code online to query Access and input the data into excel (2003), but it is much slower than it should be: Sub DataPull(SQLQuery, CellPaste) Dim Con As New ADODB.Connection Dim RST As New ADODB.Recordset Dim DBlocation As String, DBName As String Dim ContractingQuery As String If SQLQuery = "" Then Else DBName = Range("DBName") If Right(DBName, 4) <> ".mdb" Then DBName = DBName + ".mdb" DBlocation = ActiveWorkbook.Path If Right(DBlocation, 1) <> "\" Then DBlocation = DBlocation +

Why is this very simple SQL query failing in MS Access?

拥有回忆 提交于 2019-12-01 06:06:32
I have a query that by all rights should not possibly fail, and I can't for the life of me figure out why INSERT INTO Grocery_Store_Prices(Store,Item,Brand,Price,Unit,Quantity,Note) VALUES("Kroger","Cheesy Poof","Cartman",0.51,"fart",15,"what is going on"); When I try to run the query I get "Syntax error in INSERT INTO statement" with the Note field highlighted. If I omit the Note field and its value, the query works fine. Is there something really obvious I'm missing, or is there an Jet SQL quirk buried here??? The table it's acting on is: Grocery_Store_Prices ID -- autonumber primary key

Select Top (all but 10) from … in Microsoft Access

随声附和 提交于 2019-12-01 03:01:27
Say I've got a query SELECT TOP 10 ... FROM ... ORDER BY ... in Access (well, really Jet). The question is: how can I get all the other rows... everything except the top 10? Couldn't you do something like SELECT ... FROM ... WHERE PK NOT IN (SELECT TOP 10 PK FROM ...) ORDER BY ... it might not be that efficient but that's the only way off the top of my head I can think to do something like that. AFAIK there's no "BOTTOM" clause in SQL :) SELECT ... FROM .... WHERE myID NOT IN (SELECT TOP 10 myID FROM ... ORDER BY rankfield) ORDER BY sortfield Note that your sorted order could, (if you wish) be