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

Database

 
AnswerRe: Extracting just the date portion Pin
kubben30-Mar-07 5:08
kubben30-Mar-07 5:08 
GeneralRe: Extracting just the date portion Pin
Marc Clifton30-Mar-07 5:14
mvaMarc Clifton30-Mar-07 5:14 
Questiongetting RecordCount = -1 Pin
Ankur.Bakliwal30-Mar-07 3:48
Ankur.Bakliwal30-Mar-07 3:48 
AnswerRe: getting RecordCount = -1 Pin
Christian Graus30-Mar-07 3:55
protectorChristian Graus30-Mar-07 3:55 
GeneralRe: getting RecordCount = -1 Pin
Ankur.Bakliwal30-Mar-07 3:59
Ankur.Bakliwal30-Mar-07 3:59 
GeneralRe: getting RecordCount = -1 Pin
Christian Graus30-Mar-07 4:03
protectorChristian Graus30-Mar-07 4:03 
AnswerRe: getting RecordCount = -1 Pin
roel_v31-Mar-07 2:45
roel_v31-Mar-07 2:45 
QuestionDistribution of software Pin
drc_no130-Mar-07 3:41
drc_no130-Mar-07 3:41 
Hi!
I'm rather new to programming db, so... sorry if this may sound stupid.
I am using C# to create a program which does some operations with a database (basically, the project helps me better get along with databases). The .mdf file and .ldf file reside in C:\DATA\ . And on my computer, things go along smoothly.
Still, when i tried to distribute the application to a friend, i realized that i haven't build the application for anybody but me because he doesn't have the .mdf. So, he installed sql server (2000, just like mine), has put the files in C:\DATA, but he still gets an error. I know the error comes from the fact that the database is not attached to his server (asked a few friends) and i know that i must use sp_attach_db function.
The problem is that i don't know whether each time the program is run i should run this function (because if you run the program 2 times i think it gets an error) and, more important, i don't know how to really implement this function (haven't found any tutorial yet).
Another important thing is the connection string to the database. On my computer it is:
connectionString="Data Source=DRC;Initial Catalog=Consulting_co;Integrated Security=True"             providerName="System.Data.SqlClient"<br />
//from app.config
as far as i know, datasource indicates the name of the sql server and this name must modify when the program is run from another place.
Please, help!
AnswerRe: Distribution of software Pin
Colin Angus Mackay30-Mar-07 4:32
Colin Angus Mackay30-Mar-07 4:32 
QuestionUrgent Pin
Test27030730-Mar-07 2:51
Test27030730-Mar-07 2:51 
AnswerRe: Urgent Pin
Christian Graus30-Mar-07 3:06
protectorChristian Graus30-Mar-07 3:06 
GeneralRe: Urgent Pin
Test27030730-Mar-07 3:44
Test27030730-Mar-07 3:44 
GeneralRe: Urgent Pin
Christian Graus30-Mar-07 4:00
protectorChristian Graus30-Mar-07 4:00 
GeneralRe: Urgent Pin
Test27030730-Mar-07 4:02
Test27030730-Mar-07 4:02 
GeneralRe: Urgent Pin
Christian Graus30-Mar-07 4:04
protectorChristian Graus30-Mar-07 4:04 
AnswerRe: Urgent Pin
Christian Graus30-Mar-07 4:04
protectorChristian Graus30-Mar-07 4:04 
AnswerRe: Urgent Pin
DQNOK30-Mar-07 4:09
professionalDQNOK30-Mar-07 4:09 
GeneralRe: Urgent Pin
Test27030730-Mar-07 18:40
Test27030730-Mar-07 18:40 
AnswerRe: Urgent Pin
Noman Aftab31-Mar-07 1:01
Noman Aftab31-Mar-07 1:01 
Questionserver : error 18025 Pin
Navneet Hegde30-Mar-07 2:47
Navneet Hegde30-Mar-07 2:47 
AnswerRe: server : error 18025 Pin
kubben30-Mar-07 3:45
kubben30-Mar-07 3:45 
GeneralRe: server : error 18025 Pin
Navneet Hegde30-Mar-07 3:47
Navneet Hegde30-Mar-07 3:47 
GeneralRe: server : error 18025 Pin
kubben30-Mar-07 3:54
kubben30-Mar-07 3:54 
GeneralRe: server : error 18025 Pin
kubben30-Mar-07 3:56
kubben30-Mar-07 3:56 
GeneralRe: server : error 18025 Pin
Navneet Hegde30-Mar-07 3:58
Navneet Hegde30-Mar-07 3:58 

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.