|
You could try creating the spreadsheet, save it to XML and then look at the generated XML. Or you could try http://www.openoffice.org/[^].
Use the best guess
|
|
|
|
|
Thanks for the OpenXml link ... I really appreciate it ... it will help with getting additional info on this problem ..thanks
|
|
|
|
|
Hi
i make a setup in visual studio 2010 and a make it install to another laptop but the access 2010 database can not make update their queries but we can retrieve information from it.
What might be the problem?
|
|
|
|
|
If you can read from it, but not write to it, then the most likely problem is permissions on the file or the folder you have stored it in. It is probable that you have installed the database file in the application folder, which on the release machine means under one of the "Program Files" folder. Writes to these folders are heavily discouraged, and if you have done that it is a poor idea. It works on your development machine because the application is in the Debug or Release folder of your project - not the "Program Files" folder at all.
Have a look here: Where should I store my data?[^] and move you data to a more sensible location!
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
when i make the setup there are only application, user desktop and user's programs menu folder .
Where can i put my access database so the user can be modify?
|
|
|
|
|
Read the link I gave you.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
If i correctly understand i must use one of the following path as my path for my access database but how can i use it in c# ?
i must include it somewhere for example the Common.AppGuid where i have to use it?
Common.AppGuid 158aa00d-332e-440b-9c2c-47e2fc11c078
Common.AssemblyGuid 8d14ff7e-8d39-4163-a1ba-4fae4a5c361d
Common.UserDataFolder C:\Users\griff\AppData\Local\{158AA00D-332E-440B-9C2C-47E2FC11C078}\
Application.UserAppDataPath C:\Users\griff\AppData\Roaming\SetShares\SetShares\1.0.0.0
Common.UserRoamingDataFolder C:\Users\griff\AppData\Roaming\{158AA00D-332E-440B-9C2C-47E2FC11C078}\
Application.LocalUserAppDataPath C:\Users\griff\AppData\Local\SetShares\SetShares\1.0.0.0
Common.AllUsersDataFolder C:\ProgramData\{158AA00D-332E-440B-9C2C-47E2FC11C078}\
Application.CommonAppDataPath C:\ProgramData\SetShares\SetShares\1.0.0.0
thnx
|
|
|
|
|
Common.AppGuid is a value assigned to you application when you compile it.
Just add the methods, and store your file in the folder returned by AllUsersDataFolder
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
Message Closed
modified 6-Jun-13 7:55am.
|
|
|
|
|
You probably need to add the using statements.
Look at your code where the error is, and place the text cursor inside the word that is underlined in red.
A small blue block will appear at the beginning of the word. Hover the mouse over that, and a drop down list will appear.
Open the drop down, and it will present you with options to fix the problem. (In this case, probably by adding the line
using System.Reflection; for you).
(This is based on your previous post, now deleted - but still relevant, I suspect)
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
what is the B here?
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);
}
}
|
|
|
|
|
See MSDN: Guid.ToString Method[^]
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
where must i add these methods ?
there is a specific location so when the application start these methods call automatically?
where i can to call them? in program file?
|
|
|
|
|
Wherever you normally put "generic" helper methods. I would call it once from my main form and save a static string with the whole connection string ready to rock'n'roll when you need to access the file.
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
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;
}
|
|
|
|
|
So try it on your computer in the debugger and see what happens. This is not rocket science!
The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)
|
|
|
|
|
zebra88 wrote: What might be the problem?
The fact that Access isn't a database-server, but a client-application. It's not meant to serve multiple clients.
I'd suggest you hit the "Upgrade to SQL Server" button after opening the database in the Access-IDE. SQL Server Express is "free", and would be better suited for this particular task.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hey Every Body!
How do you do! I'm beginner of C# language. Now i want to save pdf file to sql and retrieve from there via C#. Someone could help me for this problem .. Thanks for every thing
|
|
|
|
|
For my 2 cents worth.
There are many ways to solve this problem.
One way, is to store the actual pdf file on server some where, and maybe store the path to where this file is located on the server, in the database. You can select out the path information information from database and retrieve the file accordingly.
Another way, store the content in the database, and create the pdf on the fly when you retrieve the information from database.
Thanks.
|
|
|
|
|
Thanks friend!
I was thinking this way. But I have no idea "How do this method "Example--- How store pdf file to SQl.. and how retrieve pdf file to C#... You can teach me-- how write this
|
|
|
|
|
naylynn wrote: How do you do! I'm beginner of C# language
First step - learn basics of putting and getting stuff from the database.
And do not use a PDF when learning that. Instead use int and string.
AFTER you are comfortable with that then learn how to put and get a blob.
|
|
|
|
|
|
Hi
I'm looking for an implementation of ToObservable and ToEnumerable
can you pls help with this
thx
|
|
|
|
|
kaminem wrote: I'm looking for an implementation of ToObservable and ToEnumerable That's a different statement than in the title.
Are you trying to convert an Observable to an Enumerable, or something else? Can you show us some code that shows what you want to convert?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
There is a simple (by MSDN's standards) of ToObservable here[^]. Likewise, in the opposite direction, here[^]
Note that these are really conversions (as opposed to casts): ToObservable takes the value from the IEnumerable on the basis of the IScheduler , whereas ToEnumerable produces the "list" from the Observable 's updates.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|