Jump to content

castech

Members
  • Posts

    4
  • Joined

  • Last visited

    Never

castech's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I don't know the answer BUT are you saying that you have placed a string constant on the block diagram and have been able to create a reference to it? How? Sorry - we are all here to learn!! Cheers
  2. Hi, Attached is a very simple VI that will read data from a table in mySQL. You need to modify the connection string to suit your database. There is also some example SQL on teh page that could be used to insert a record into a database. I have used LabSQL quite a lot but always use the SQL Execute icon and build the SQL command string by concatinating the required syntax with teh values I want to write. Of course you can create a subVI that will allow you to pass in an array of column names and data (similar to the NI Database Connectivity Toolkit). I hope this helps. Cheers Download File:post-7495-1168706374.vi
  3. Hi Donald, I am not sure that this is a bug but agree that it is inconvenient (and possibly uindesirable). An unsigned datatype does not expect a sign as it assumes the value to be '+' anyway and therefore the sign is an invalid character. It is very easy to trap out though. Cheers
  4. Hey Bob, From what I can see there are several issues here......... The string that you are comparing to has '\t' as text inserted in the string not the code '\t' indicating a tab. To correct this, right click on the regular expression constant and select 'codes display'. You will then see some extra '\' inserted. Remove these (i.e. make it look like it did when it wasn't in code display mode). The reason you are losing a character is that the text you are writing is longer than the text you are replacing. Remember that you are writing text from the start of the file regardless of how may characters were read. If you read 5 characters and wrote 10, you would replace the first 5 that you intended plus an extra 5 that you didn't want to overwrite. The only way around this is to read the text into memory after the matched string, append this to your new text and write it all out again.You can not just say 'replace the first line of text' because this requires other data in the file to be moved anyway. I agree with Mikkel, you have already read all of the text into memory so instead of using the match pattern icon, whjy not use the search and replace icon which will do the replace for you and then write out the whole text again. I have attached what I mean. Hope I have understood what you are trying to do! Cheers Download File:post-7495-1168703637.vi
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.