keiran Posted November 24, 2006 Report Share Posted November 24, 2006 Recently I use NI SQL Toolkit Connect MS Server, I use System DSN, It's OK to Connect the Database and It's OK to Create Table in the Default Database, but I can't ListTables and Can't List All Column's Information.Why? Please Help,tks! Then I use UDL File Path as the input of Open Connection VI, This time can Obtain All tables In the database ,but when I want to List All column's information of one specific Table, the Error described Below, must I set some permiition in database? why this error happened? tks! images below is the error dailog and the create table vi and the List Column vi Quote Link to comment
crelf Posted November 24, 2006 Report Share Posted November 24, 2006 My SQL is a little rusty, but here goes: it could be a permissions issue, but I doubt it since you're able to create the table and insert data. Have you looked at the table using something other than LabVIEW to make sure that the data actually goes into the table? Can you post the database file to we can check it out? What's in the "table" control? You might actually have more than one table in your DB - how big is the 1D string array that comes out of "DB Tools List Tables"? Are you sure indexing out the 0th element is getting the table you expect and not one that already existed? Quote Link to comment
keiran Posted November 25, 2006 Author Report Share Posted November 25, 2006 My SQL is a little rusty, but here goes: it could be a permissions issue, but I doubt it since you're able to create the table and insert data. No, I only can Create the Table, I can't Insert data! the Error Message is the Same! Have you looked at the table using something other than LabVIEW to make sure that the data actually goes into the table? Can you post the database file to we can check it out? What's in the "table" control? Yes ,the Created table is here, and the Columns is what I want to creat! You might actually have more than one table in your DB - how big is the 1D string array that comes out of "DB Tools List Tables"? Are you sure indexing out the 0th element is getting the table you expect and not one that already existed? It's only a test, so I am sure indexing out the 0th element is getting the table I expect and not one that already existed! Quote Link to comment
French LVer Posted November 27, 2006 Report Share Posted November 27, 2006 Hi, I tested "DB Tools List Tables.vi" in order to check your problem. (I'm using LV 7.1.1) In my Access database, table referenced at index 0 doesn't really exist. It seems to be a metabase. So i think you must access first table of your database with index 1. I hope that solves your problem Quote Link to comment
crelf Posted November 27, 2006 Report Share Posted November 27, 2006 I think we're all a little mixed up here - is the problem that you can't write data into a table, or that you can't read it out from a table? Quote Link to comment
keiran Posted November 28, 2006 Author Report Share Posted November 28, 2006 Hi,I tested "DB Tools List Tables.vi" in order to check your problem. (I'm using LV 7.1.1) In my Access database, table referenced at index 0 doesn't really exist. It seems to be a metabase. So i think you must access first table of your database with index 1. I hope that solves your problem No,I Probed my 0th element, It is one of table in my Database! I think we're all a little mixed up here - is the problem that you can't write data into a table, or that you can't read it out from a table? Yes, I Can Create the Table, But I can not write data into a table and can not read it out from a table! Quote Link to comment
crelf Posted November 28, 2006 Report Share Posted November 28, 2006 Yes, I Can Create the Table, But I can not write data into a table and can not read it out from a table! So let's assume that the real problem is that you can't write into the table and ignore the reading issue for the moment. Are you sure you have permission to write into tables? Check you persmissions. Can you upload the DB for us to look at? Quote Link to comment
xtal Posted November 30, 2006 Report Share Posted November 30, 2006 Yes, check the permissions and if that's okay, then you need to double-check data types. The types of each field must match the types in LabVIEW. I second Chris's request to see the database; even screen captures showing the fieldnames and types and the LV data you are trying to write are good. Quote Link to comment
French LVer Posted December 1, 2006 Report Share Posted December 1, 2006 Hi, In order to test your database link you can use this little sample. I use MySQL database. First, you must have created a database ( CREATE DATABASE `MyDatabase` ; ) and made an UDL link. This sample create a table, insert two rows, read all data and destroy it. If you still have link problem, we will be sure it will be access rights Download File:post-6860-1164957361.zip Quote Link to comment
knifeman Posted December 20, 2006 Report Share Posted December 20, 2006 I suggested that you have writen the wrong command form. for example, insert into `<Table name>` values (<data>),take notes that :1 string data must use " ' " to concluded,for example : 'string' 2 Table name must use " ` " to conclude ,the example is `sample`. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.