Actually, I think both of those issues are right. Acces is very particular about spaces, as well.
Printable View
Actually, I think both of those issues are right. Acces is very particular about spaces, as well.
this piece of code
gives this errorCode:adapter.SelectCommand.CommandText = ("Select * From TrackList Where [Track ID] = ""2""")
An unhandled exception of type 'System.NullReferenceException' occurred in radio station.exe
why?
there is an entry in the database with id 2, but only 1 of them.
If the datatype of the ID is a number, maybe it would help to try it without the quotes. That's another possible problem, since quotes are usually associated with strings.
still doesn't help i'm afraid.
Can anyone help me please?
You usually only get that error message when you aren't getting any records comming into the dataset. Are you sure that your connection is valid?
well,
preview data works within adapter properties works, and it produces the full list of records when i do select * from table.
Thats why I thought it must be the way I was putting down the SQL in my code. stupid ain't it? :eek:
yeah, that says to me that the connection is fine and that the adapter should be working fine. Are you sure the dataset is set up right?
Hi
As far as i know the data set is fine.
:confused:
Try running the program through the debugger to see where the error is coming from. Your best bet is to probably set up a break point around the step where you begin creating the adapter and then run through the code line by line to see where errors are thrown. It might also help to see what your local variables look like. It's possible that your query might not look as you expect it to look.