Click here to Skip to main content
15,906,558 members
Home / Discussions / C#
   

C#

 
GeneralRe: c# error with database query transactions Pin
OriginalGriff6-Jun-13 0:44
mveOriginalGriff6-Jun-13 0:44 
GeneralMessage Closed Pin
6-Jun-13 1:07
User34906-Jun-13 1:07 
GeneralRe: c# error with database query transactions Pin
OriginalGriff6-Jun-13 1:10
mveOriginalGriff6-Jun-13 1:10 
GeneralRe: c# error with database query transactions Pin
User34906-Jun-13 1:18
User34906-Jun-13 1:18 
GeneralRe: c# error with database query transactions Pin
OriginalGriff6-Jun-13 1:26
mveOriginalGriff6-Jun-13 1:26 
GeneralRe: c# error with database query transactions Pin
User34906-Jun-13 7:34
User34906-Jun-13 7:34 
GeneralRe: c# error with database query transactions Pin
OriginalGriff6-Jun-13 8:00
mveOriginalGriff6-Jun-13 8:00 
GeneralRe: c# error with database query transactions Pin
User34906-Jun-13 8:14
User34906-Jun-13 8:14 
I don't understand very well what i must do it so the user can make update thee queries to access database without problems when he already run my application program in his laptop

the actions that i have to do if i understand correctly is to add the following methods in program.cs
but i don't understand how i call ant save it with connection string

///
/// Get the Application Guid
///

public static Guid AppGuid
{
get
{
Assembly asm = Assembly.GetEntryAssembly();
object[] attr = (asm.GetCustomAttributes(typeof(GuidAttribute), true));
return new Guid((attr[0] as GuidAttribute).Value);
}
}
///
/// Get the current assembly Guid.
/// <remarks>
/// Note that the Assembly Guid is not necessarily the same as the
/// Application Guid - if this code is in a DLL, the Assembly Guid
/// will be the Guid for the DLL, not the active EXE file.
///
///

public static Guid AssemblyGuid
{
get
{
Assembly asm = Assembly.GetExecutingAssembly();
object[] attr = (asm.GetCustomAttributes(typeof(GuidAttribute), true));
return new Guid((attr[0] as GuidAttribute).Value);
}
}
///
/// Get the current user data folder
///

public static string UserDataFolder
{
get
{
Guid appGuid = AppGuid;
string folderBase = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string dir = string.Format(@"{0}\{1}\", folderBase, appGuid.ToString("B").ToUpper());
return CheckDir(dir);
}
}
///
/// Get the current user roaming data folder
///

public static string UserRoamingDataFolder
{
get
{
Guid appGuid = AppGuid;
string folderBase = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string dir = string.Format(@"{0}\{1}\", folderBase, appGuid.ToString("B").ToUpper());
return CheckDir(dir);
}
}
///
/// Get all users data folder
///

public static string AllUsersDataFolder
{
get
{
Guid appGuid = AppGuid;
string folderBase = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
string dir = string.Format(@"{0}\{1}\", folderBase, appGuid.ToString("B").ToUpper());
return CheckDir(dir);
}
}
///
/// Check the specified folder, and create if it doesn't exist.
///

/// <param name="dir" />
/// <returns>
private static string CheckDir(string dir)
{
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
return dir;
}
GeneralRe: c# error with database query transactions Pin
OriginalGriff6-Jun-13 8:16
mveOriginalGriff6-Jun-13 8:16 
AnswerRe: c# error with database query transactions Pin
Eddy Vluggen5-Jun-13 23:19
professionalEddy Vluggen5-Jun-13 23:19 
QuestionHow to upload pdf file from sql to C# Pin
naylynn5-Jun-13 4:36
naylynn5-Jun-13 4:36 
AnswerRe: How to upload pdf file from sql to C# Pin
vanikanc5-Jun-13 4:42
vanikanc5-Jun-13 4:42 
GeneralRe: How to upload pdf file from sql to C# Pin
naylynn6-Jun-13 6:58
naylynn6-Jun-13 6:58 
AnswerRe: How to upload pdf file from sql to C# Pin
jschell5-Jun-13 9:27
jschell5-Jun-13 9:27 
GeneralRe: How to upload pdf file from sql to C# Pin
naylynn13-Aug-14 23:07
naylynn13-Aug-14 23:07 
Questionconvert from IObservable to IEnumerable Pin
kaminem5-Jun-13 4:01
kaminem5-Jun-13 4:01 
AnswerRe: convert from IObservable to IEnumerable Pin
Eddy Vluggen5-Jun-13 5:34
professionalEddy Vluggen5-Jun-13 5:34 
AnswerRe: convert from IObservable to IEnumerable Pin
Keith Barrow5-Jun-13 6:16
professionalKeith Barrow5-Jun-13 6:16 
AnswerRe: convert from IObservable to IEnumerable Pin
Abhinav S5-Jun-13 7:31
Abhinav S5-Jun-13 7:31 
AnswerRe: convert from IObservable to IEnumerable Pin
Clifford Nelson5-Jun-13 8:15
Clifford Nelson5-Jun-13 8:15 
QuestionDisplay columns from tables of two different databases in a single gridview Pin
Anuraag15-Jun-13 0:35
Anuraag15-Jun-13 0:35 
AnswerRe: Display columns from tables of two different databases in a single gridview Pin
Eddy Vluggen5-Jun-13 1:23
professionalEddy Vluggen5-Jun-13 1:23 
QuestionGet used space of DVD disc Pin
ndkit4-Jun-13 16:39
ndkit4-Jun-13 16:39 
AnswerRe: Get used space of DVD disc Pin
Abhinav S4-Jun-13 20:58
Abhinav S4-Jun-13 20:58 
GeneralRe: Get used space of DVD disc Pin
ndkit5-Jun-13 1:38
ndkit5-Jun-13 1:38 

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.