So I changed the table configuration so there is a primary key that automatically increases although the above code still gives me an error. Any thoughts as to why?
Error I get is "Syntax error in UPDATE statement"
Thanks again
Thanks for helping me out with those tags and moving the post.
I have been banging my head against a wall trying to come up with syntax to produce my desired outcome. It seems pretty simple but when eve I find a good enough example online it doesn't quite come out like I hope. Could you please...
If anyone can point out my error it would be much appreciated.
This is the error message: Syntax error in UPDATE statement.
Here's my code:
Sub addSpot(ByRef row As Integer, ByRef col As Integer, ByRef value As String)
Dim con As New OleDbConnection
Dim dbProvider As String...
OK so at what point would I declare a primary key? Is it a command every time I create a new record or do I just set it up when I set up the table?
Thanks for your patience
Hi if anyone could offer any advice I would be very grateful.....
I'm trying to write to a spot in a database and am getting this error message:
Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
Here is my...
Thank you again,
What exactly do you mean by that? How do I ensure to install all the components. I'm new to this whole database thing.
Thanks for your patience
So stupid.... Thankyou for the advice.
I have another question, does this mean that I could only run this aplication on a computer with MS access installed?
Thanks again,
Brandon
I am needing some help writing to a database.
I have written a relatively large application for a nursery school using text files as my source of permanent storage. I have decided that it would be more productive and safer if I could use a database instead. I have also chosen to rewrite the...
Reply
I agree with you that making it more complicated is bad way to go about things but this above code seems to do a better job than using a block. Its as if the file would just not get unlocked. Strange because the same function would work over and over and then just throw an exception...
Reply
Thankyou for the reply.
I will go ahead and edit the code above after I submit this.
With regards to the code, I was doing just as you advised, using streamreader. But thats when I was experiencing the problem most. Randomly I wouldnt be able to write to the file. It would say that...
To cut a long story short I am having problems with stream reader and a text file being locked. On a button click I am trying to read from a file, then add a integer to that read value and then write the new value to the same file.
Not always but, it sometimes throws an exception. Id say every...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.