user1578890
user1578890

Reputation: 1

Connect to vertica database using odbc in asp.net and return a dataset

I have inserted some rows in vertica database using insert command on terminal.It shows when i read the record using select command.But i am not able to see record when connect to database using ODBC connection also i am able to find that row when restart the vertica.Please help me to solved out the problem.

Upvotes: 0

Views: 892

Answers (4)

Joseph
Joseph

Reputation: 2245

By default Vertica ISOLATION level is READ COMMITTED mode which means other sessions read only data that is COMMITTED. If you've inserted but not committed, with this level, other sessions cannot read the data you've inserted

Upvotes: 0

QuinnG
QuinnG

Reputation: 6424

To elaborate a bit beyond Bobby W's response.
When you perform an insert it will show the data to your current session. This allows a user to perform operations and use 'temporary' data and not affect/corrupt what other people are doing. It is session based data. That is why you can insert and see the data, but when connecting from a 2nd source, are unable to see it.

To 'commit' the data to the database you need to issue the COMMIT; statement as Bobby W mentioned.

Failing to issue COMMIT; is something I've also overlooked more than a few times.

Upvotes: 1

Bobby W
Bobby W

Reputation: 875

Did you COMMIT; after you inserted the rows? It's a simple thing, but one that I've overlooked myself many times in the past.

Upvotes: 2

Joe
Joe

Reputation: 200

To clarify, you can see the rows after you restart? Are you connecting to the database as the same user from ODBC and vsql?

Upvotes: 0

Related Questions