Jump to content

SQLite problems with where statements and data binding


Recommended Posts

hey guys,

I'm pretty new to Labview and very new to databases. I found SQLite and thought it would be a good fit for a new project, but I'm having a hard time getting the where statements to work so I get the data I'm expecting.

Ive created a table in a database editor called parts, it has two fields part type and serial number. I scan a tag to get a serial number and would like my database call to return the appropriate part type. Right now I only have one value in each column ( a single serial number and a single part type). I tried to use the "?" and bind the serial number to it but kept getting zero returned values. I can get the part type value by saying "SELECT PartType FROM Parts".

I must be doing something very simple wrong, I tried to look on the SQLite.org but really wasnt sure what I was missing in the syntax section for select.

any help would be great,

Thanks

DBPartTypeFromSN.png

Link to comment

hey guys,

Sorry my problem had nothing to do with my SQL syntax. When I put the actual serial number in the database I was lazy and just scanned it in, the scanner appends a newline character, so my strings really weren't matching up.

Thanks though : )

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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