SQL CE Transaction Problem
From: Jonathan (Jonathan_at_discussions.microsoft.com)
Date: 06/20/04
- Previous message: Peter Foot [MVP]: "Re: Add item to TODAY or ADD APPOINTMENT TO CALENDAR"
- Next in thread: Sujoy Gupta: "Re: SQL CE Transaction Problem"
- Reply: Sujoy Gupta: "Re: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Jon Skeet [C# MVP]: "Re: SQL CE Transaction Problem"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 20 Jun 2004 13:08:01 -0700
I am trying to start a transaction and I am getting this error:
BeginTransaction requires an open and availible Connection. The connection's current state is Open, Fetching.
I have executed previous SQL statements, but they should have been completed several lines before I try to start the transaction. Here is my code to start the transaction:
'start the transaction
Try
i = 0
SQLCmd = New SqlServerCe.SqlCeCommand
i = 1
SQLCmd.Connection = SqlConn
i = 2
trans = SqlConn.BeginTransaction
i = 3
SQLCmd.Transaction = trans
Catch ex As Exception
MsgBox("Error with trans " & i & vbCrLf & DBOpen)
MsgBox(ex.Message)
End Try
SQLConn is a global varialbe that I am using for my connection. I thought that this was the best way to do it. Can SQL CE databases have multiple connections open at once?
Also, what is the maximum number of queries that can be part of a transaction? My program could possibly add about 32,000 for a transaction. Do I need to break it into smaller peices? Thanks for the help.
- Previous message: Peter Foot [MVP]: "Re: Add item to TODAY or ADD APPOINTMENT TO CALENDAR"
- Next in thread: Sujoy Gupta: "Re: SQL CE Transaction Problem"
- Reply: Sujoy Gupta: "Re: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Krzysztof Kazmierczak: "RE: SQL CE Transaction Problem"
- Reply: Jon Skeet [C# MVP]: "Re: SQL CE Transaction Problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|