Click here to Skip to main content
15,921,062 members
Home / Discussions / Database
   

Database

 
GeneralMSDE Pin
Renjith Ramachandran11-Aug-04 0:04
Renjith Ramachandran11-Aug-04 0:04 
GeneralRe: MSDE Pin
Renjith Ramachandran13-Aug-04 1:03
Renjith Ramachandran13-Aug-04 1:03 
GeneralRe: MSDE Pin
Blake V. Miller25-Oct-04 19:56
Blake V. Miller25-Oct-04 19:56 
QuestionWhy Procedures? Pin
Sumit Domyan10-Aug-04 7:32
Sumit Domyan10-Aug-04 7:32 
AnswerRe: Why Procedures? Pin
VenkatFor.NET10-Aug-04 8:06
VenkatFor.NET10-Aug-04 8:06 
GeneralRe: Why Procedures? Pin
Michael Potter11-Aug-04 4:37
Michael Potter11-Aug-04 4:37 
AnswerRe: Why Procedures? Pin
munawarhussain11-Aug-04 5:02
munawarhussain11-Aug-04 5:02 
GeneralSQL Server Connection Attempt Never Times Out Pin
shultas10-Aug-04 5:24
shultas10-Aug-04 5:24 
Hey all. I'm having a problem getting a connection to a SQL Server to timeout. What is happening is I am using CDatabase::OpenEx (code below). If the computer is disconnected from the network, or the database server is down, the program just hangs forever. It never even times out after five or ten minutes and I have to manually end the process.

Here's what I'm using to connect:
CString DBCONNECT = "Driver={SQL Server};Connection Timeout=10;Server=DSC\\DAVEINSTANCE;Database=Master;Uid=sasd;Pwd=blah;"

CDatabase myDB;
myDB.SetLoginTimeout(10);
TRY {
myDB.OpenEx(DBCONNECT,CDatabase::noOdbcDialog);

.... If the server is there, it works great, connects instantly. If the server is not running, or the computer is not plugged into the network, the program just sits forever (it does not even time out after 5 or 10 minutes!).

I've tried without "Connection Timeout=10;" in the connection string, and only using myDB.SetLoginTimeout ... and vice versa ... without SetLoginTimeOut. I've also tried "Connect Timeout=10" Neither of these are working. I saw in the MSDN that some connections do not allow SetLoginTimeout, but I'm guessing there has to be a way to time out the connection for SQL Server instead of having the program hang on myDB.OpenEx().

Any help is appreciated!
Generalvery urgent - pls help: sql server data screwed Pin
matthias s.9-Aug-04 4:07
matthias s.9-Aug-04 4:07 
GeneralRe: very urgent - pls help: sql server data screwed Pin
Bill Dean9-Aug-04 5:56
Bill Dean9-Aug-04 5:56 
GeneralRe: very urgent - pls help: sql server data screwed Pin
matthias s.9-Aug-04 13:39
matthias s.9-Aug-04 13:39 
GeneralRe: very urgent - pls help: sql server data screwed Pin
Colin Angus Mackay9-Aug-04 6:11
Colin Angus Mackay9-Aug-04 6:11 
GeneralRe: very urgent - pls help: sql server data screwed [addendum] Pin
Colin Angus Mackay9-Aug-04 6:17
Colin Angus Mackay9-Aug-04 6:17 
GeneralRe: very urgent - pls help: sql server data screwed [addendum] Pin
matthias s.9-Aug-04 13:42
matthias s.9-Aug-04 13:42 
GeneralFOR XML EXPLICIT Pin
Anonymous9-Aug-04 3:17
Anonymous9-Aug-04 3:17 
GeneralNormalization question Pin
Roger Alsing8-Aug-04 20:23
Roger Alsing8-Aug-04 20:23 
GeneralRe: Normalization question Pin
slvrscremr9-Aug-04 3:31
slvrscremr9-Aug-04 3:31 
GeneralRe: Normalization question Pin
Roger Alsing9-Aug-04 3:32
Roger Alsing9-Aug-04 3:32 
GeneralRe: Normalization question Pin
slvrscremr9-Aug-04 3:57
slvrscremr9-Aug-04 3:57 
GeneralRe: Normalization question Pin
slvrscremr9-Aug-04 4:09
slvrscremr9-Aug-04 4:09 
GeneralRe: Normalization question Pin
Steven Campbell9-Aug-04 10:26
Steven Campbell9-Aug-04 10:26 
GeneralThreads in stored procedures Pin
Member 2866418-Aug-04 19:54
Member 2866418-Aug-04 19:54 
QuestionOptimezed use ADO.Net? Pin
rbarzallo7-Aug-04 6:58
rbarzallo7-Aug-04 6:58 
AnswerRe: Optimezed use ADO.Net? Pin
slvrscremr9-Aug-04 3:23
slvrscremr9-Aug-04 3:23 
GeneralORACLE / ADO .NET: TNS: Packet Writer Failure in parameterized query Pin
slvrscremr6-Aug-04 8:18
slvrscremr6-Aug-04 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.