Click here to Skip to main content
15,886,199 members
Home / Discussions / Database
   

Database

 
GeneralRe: Updating the xml to be returned from stored procedure Pin
ONeil Tomlinson29-Sep-08 22:15
ONeil Tomlinson29-Sep-08 22:15 
GeneralRe: Updating the xml to be returned from stored procedure Pin
Wendelius30-Sep-08 2:54
mentorWendelius30-Sep-08 2:54 
Questionhow to install sql server database on windows XP OS ? Pin
Tridip Bhattacharjee28-Sep-08 4:25
professionalTridip Bhattacharjee28-Sep-08 4:25 
AnswerRe: how to install sql server database on windows XP OS ? Pin
Wendelius28-Sep-08 4:34
mentorWendelius28-Sep-08 4:34 
QuestionSQL Express Pin
Ali Tavakol27-Sep-08 0:46
Ali Tavakol27-Sep-08 0:46 
AnswerRe: SQL Express Pin
Paul Conrad27-Sep-08 5:37
professionalPaul Conrad27-Sep-08 5:37 
Answerhey everyone! It's URGENT! Pin
leckey27-Sep-08 13:39
leckey27-Sep-08 13:39 
GeneralRe: hey everyone! It's URGENT! Pin
Ali Tavakol27-Sep-08 20:43
Ali Tavakol27-Sep-08 20:43 
This is my code:

<br />
	_ConnectionPtr	m_pConnection;<br />
<br />
	CoInitialize(NULL);<br />
<br />
	m_csDataSource = <br />
	"Provider=SQLNCLI;Server=.\\SQLExpress; \<br />
	AttachDbFilename=C:\\DATABASE#1.MDF; \<br />
	Trusted_Connection=Yes;"<br />
<br />
/*<br />
I also tried this:<br />
<br />
	m_csDataSource = <br />
	"Driver={SQL Native Client}; \<br />
	Server=.\\SQLEXPRESS; \<br />
	AttachDbFilename=C:\\Database#1.mdf; \<br />
	Trusted_Connection=yes;"<br />
*/<br />
<br />
	HRESULT hRes = m_pConnection.CreateInstance(__uuidof(Connection));<br />
	if (SUCCEEDED(hRes))<br />
	{<br />
		hRes = m_pConnection->Open(_bstr_t((LPCTSTR)m_csDataSource),<br />
			_bstr_t(L""),_bstr_t(L""),adModeUnknown);<br />
		if (SUCCEEDED(hRes))<br />
		{<br />
			m_bIsConnectionOpen = TRUE;<br />
		}<br />
	}<br />


I get this error:
An attempt to attach an auto-named database for file C:\\Database#1.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located in on UNC share.
General:face palm: Pin
leckey28-Sep-08 6:45
leckey28-Sep-08 6:45 
GeneralRe: :face palm: Pin
Paul Conrad29-Sep-08 6:50
professionalPaul Conrad29-Sep-08 6:50 
QuestionIndexing Question Pin
Meysam Mahfouzi26-Sep-08 20:49
Meysam Mahfouzi26-Sep-08 20:49 
AnswerRe: Indexing Question Pin
Wendelius26-Sep-08 22:38
mentorWendelius26-Sep-08 22:38 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi26-Sep-08 23:25
Meysam Mahfouzi26-Sep-08 23:25 
GeneralRe: Indexing Question Pin
Wendelius26-Sep-08 23:51
mentorWendelius26-Sep-08 23:51 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi27-Sep-08 0:03
Meysam Mahfouzi27-Sep-08 0:03 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi27-Sep-08 2:35
Meysam Mahfouzi27-Sep-08 2:35 
GeneralRe: Indexing Question Pin
Wendelius27-Sep-08 3:06
mentorWendelius27-Sep-08 3:06 
QuestionConvert datetime to just time (only hour) Pin
notes4we26-Sep-08 10:03
notes4we26-Sep-08 10:03 
AnswerRe: Convert datetime to just time (only hour) Pin
PIEBALDconsult26-Sep-08 10:38
mvePIEBALDconsult26-Sep-08 10:38 
AnswerRe: Convert datetime to just time (only hour) Pin
Blue_Boy26-Sep-08 23:47
Blue_Boy26-Sep-08 23:47 
QuestionSQL SP Pin
Care Career26-Sep-08 9:02
Care Career26-Sep-08 9:02 
AnswerRe: SQL SP Pin
Wendelius26-Sep-08 9:30
mentorWendelius26-Sep-08 9:30 
GeneralRe: SQL SP Pin
Care Career28-Sep-08 6:55
Care Career28-Sep-08 6:55 
GeneralRe: SQL SP Pin
Wendelius29-Sep-08 3:41
mentorWendelius29-Sep-08 3:41 
GeneralRe: SQL SP Pin
Care Career28-Sep-08 6:59
Care Career28-Sep-08 6:59 

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.