|
How can i do to write function to convert MS Access database to MYSQL database.
I tried so hard and got so far
|
|
|
|
|
Hi!
I use a PropertyGrid to display the properties of certain objects. Now what is that stange button next to the alphabetical sort button? It is always disabled. Is there a possibility to remove this button? It has already confused users because its always disabled and doesn't do anything.
|
|
|
|
|
Hello,
I print same word document consecutively by using C#. But Word document's content changes in each printing operation. For instance; my word document is "master.doc. In each consecutive print, i see "master.doc" in print queue. I wanna change word document display name in print queue. For example if i write A City data to word document, i wanna see word document display name in print queue is "A_master.doc" printing, then if i write B City data to word document, i wanna see word document display name in print queue is "B_master.doc" printing. I use Word object to print. How can i do this? How can i set word document display name in printer queue? Is there easy way to do this?
I read this article : http://www.codeproject.com/dotnet/NET_Printer_Library.asp
But,is there a command to set,change word document display name in printer queue?
Thanks.
|
|
|
|
|
|
Hi all,
I have a problem with a hit test using Region. I'm using this code but it doesn't seem to work. Shape is a Panel and Map is a PictureBox
public bool Hit(Shape shape)
{
Map map = (Map) this.Parent;
Region thisRegion = (Region) this.Region.Clone();
thisRegion.Intersect(shape.Region);
Region r = new Region();
r.MakeEmpty();
Graphics mapGraphics = map.CreateGraphics();
return (!thisRegion.Equals(r, mapGraphics));
}
Anyone has an idea or suggestion to make this work?
Thanks,
Marco Glorie
|
|
|
|
|
Hello,
I have a big problem , i can't find a way to to pass a string variable to a dll calling a matlab program,
Really it's a very important to me
Thanks
|
|
|
|
|
Just type matlab into the seach box at the top of this screen and you will find and artilce called "1,2,3 MATLAB" or something similiar to that....
/\ |_ E X E GG
|
|
|
|
|
I am using aysynchronous socket communication between client and server. In BeginAccept function in server we have parameters : CallBack, object2.
In client BeginConnect it send we have parameters : Endpoint, callback, object1
Can I get object1 on server beginAccept when client connect as I have information about the client in object1.
So when I use object2 it should have information that I had in object1.
But this is not happening!!!
Can some one tell me how I can get information about client object on BeiginConnect()?
If so can you tell how to do this?
Client : m_sock.BeginConnect( epServer, onconnect, object1 );
Server : listener.BeginAccept( new AsyncCallback( app.OnConnectRequest ), object2 );
Thanks a lot
C. Anil
|
|
|
|
|
Hi
When i open the excel file , it displays the date in correct format for example : 20-Apr-05
When i read tthat cells date value its takes the same value as 38462.91672
How can i retrive the same date format in dotnet datetime format.
Open the excel application
Type any date
Right click ->Format cells --> choose Number Tab window -> select Category Number ->press ok
This format i get the values
How can i retrive the same values as Datetime format
Regards
sanjeev
|
|
|
|
|
Hello,
Try to use DateTime.FromOADate static method. It takes a double as parameter and converts it the DateTime object. 38462.91672 is OLE Automation date.
Quoting MSDN:
An OLE Automation date is implemented as a floating-point number whose value is the number of days from midnight, 30 December 1899. For example, midnight, 31 December 1899 is represented by 1.0; 6 A.M., 1 January 1900 is represented by 2.25; midnight, 29 December 1899 represented by -1.0; and 6 A.M., 29 December 1899 represented by -1.25.
Only DateTime objects with a tick value that is greater than or equal to positive or negative 31241376000000000 can be represented as an OLE Automation Date. An uninitialized DateTime, that is, an instance with a tick value of 0, is converted to the equivalent uninitialized OLE Automation Date, that is, a date with a value of 0.0 which represents midnight, 30 December 1899.
HTH. Cheers
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
I am trying to access XML web service in my Smart Device application from a remote computer .It is throwing exception (401) Unauthorized.can any body help me.
thx
Learner always
|
|
|
|
|
hai friends i have got a problem while adding the combobox to a windowsForms dataGrid..
my problem is if i select a data from the combobox the data is added to the data base...
but it is not gettting displayed on the datagrid...
my code goes like this
//creating the table style
DataGridTableStyle tablestyle=new DataGridTableStyle();
tablestyle.MappingName ="DataTablename";
//adding the combobox
DataGridComboBoxColumn crelation=new DataGridComboBoxColumn(); crelation.MappingName="Column name";
crelation.HeaderText="Relation";
crelation.Width=100;
crelation.ColumnComboBox.DataSource=Dataset.Tables[5].DefaultView;
crelation.ColumnComboBox.DisplayMember ="ColumnName";
crelation.ColumnComboBox.ValueMember="Id";
tablestyle.GridColumnStyles.Add(crelation)
DataGrid1.TableStyles.Clear();
DataGrid1.TableStyles.Add(tablestyle);
thanks
|
|
|
|
|
i am IT student from malaysia but i don't have any knoeledge about C#.....i want to learn the C# programming language but i don't know what software do i need to install to run the C#.....Thank you
|
|
|
|
|
You need to install the .NET framework. Also, if you don't have an IDE, you can try Sharp Develop[^], although I would personally recommend buying the student version of Visual Studio, for a myriad of reasons.
However, if you download the .NET framework SDK[^], you will have everything you need to write C# programs in notepad, if you really want to
I should mention that the .NET framework is all people need to RUN your software, but the SDK also gives you the compiler and tools needed to create the files from source code. You get all that installed for you if you buy VS.NET, plus you get the full MSDN library ( more info than you could buy in books for the same price ), and a productivity boosting IDE that will make you far more likely to succeed in learning/using C#.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am new to DirectX programming and I am looking for a little help setting up methods to load multiple .x files and textures. If anyone has any examples that I could look at it would be helpful. If you have any questions or if I need to clarify what I what I am looking for please write.
Thanks for any help
any help out there?
|
|
|
|
|
I am kind of stuck on stupid, and need some help. The following code works only once and then I get and error because of multi '@Param' use. I coded it this way because of the need to do some conversions as you can see. Can someone tell me how to code this in the correct way? I am new at this kind of code.
Norm
try
{
sqlInsertCommand1.CommandText = "INSERT INTO services([service-code], [service-description] ,[large-animal-cost], [medium-animal-cost], [small-animal-cost])" +
" values(@Param1,@Param2,@Param3, @Param4,@Param5) SELECT @@IDENTITY";
SqlParameter param = sqlInsertCommand1.Parameters.Add("@Param1",SqlDbType.Int);
param.Value = txtServiceCode.Text;
param = sqlInsertCommand1.Parameters.Add("@Param2",SqlDbType.VarChar);
param.Value = txtServiceDesc.Text;
param = sqlInsertCommand1.Parameters.Add("@Param3",SqlDbType.Money);
param.Value = Convert.ToDecimal(cbLargeAnimalCost.Text);
param = sqlInsertCommand1.Parameters.Add("@Param4",SqlDbType.Money);
param.Value = Convert.ToDecimal(cbMediumAnimalCost.Text);
param = sqlInsertCommand1.Parameters.Add("@Param5",SqlDbType.Money);
param.Value = Convert.ToDecimal(cbSmallAnimalCost.Text);
sqlInsertCommand1.Connection = sqlConnection1;
if (sqlConnection1.State != ConnectionState.Open)
sqlConnection1.Open();
sqlInsertCommand1.ExecuteNonQuery();
nbohana
|
|
|
|
|
The best way to do this is to write a stored procedure. If you don't have a real database, then you can try giving your parameters reasonable names.
However, the problem here is that sqlInsertCommand1 appears to be a member variable, which means that
NormBohana wrote:
SqlParameter param = sqlInsertCommand1.Parameters.Add("@Param1",SqlDbType.Int);
the second time around is trying to add a parameter that is already there. Instead, you should not make the command a member, or put the parameters in when you create it ( I'd put it in a property to do this, if it was me, with lazy initialisation ), and then find the parameters to set them instead of adding them. But this is really messy, and error prone, because you introduce state needlessly. You should only have one piece of generic code that calls this SQL, that's what creating a stored procedure would help you enforce.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi
Can anybody help me in reading data from Excel
i want to place my Excel sheet in my application folder,and read it through application. no matter where the application is placed wether in c:/ or d:/.
Basically my requirement is should not Hard-Code the Path of Excel Sheet
fdvddsfcdsfcdvdfvfdsfsadfdsfdsfsdf
|
|
|
|
|
|
This is driving me crazy. I keep getting the big ugly useless block of text errors and I can't figure out why. Take for example this snippet from my aspx page...
<asp:ImageButton id="ibRoles" runat="server" ImageUrl='<%# GetImageLink("pawn_glass_blue.gif"); %>' CommandName="Roles" AlternateText="Roles" ToolTip="Edit roles"></asp:ImageButton>
You see that I know the name of the image that I want, so I am trying to pass it to a method in my .cs file that will determine the full path to the image, plop the image on filename on the end and deliver it back to the caller. Here is the GetImageLink method...
public string GetImageLink(object imageName)
{
string path = Request.Path.Substring(0,
Request.Path.LastIndexOf("/") + 1 );
return path + "Resources/BlueImages/"
+ (string)imageName;
}
I have tried making the parameter a string and an object. It doesn't matter. The page parser pukes on it every time.
It seems to me that this is fundamental. Why can't I find any examples for this that aren't assuming I am getting my input from a bound database?
Phillip H. Blanton
www.ComponentScience.net
Email: Phillip at that domain that you see one line above the line you are reading now.
|
|
|
|
|
Phillip H. Blanton wrote:
I have tried making the parameter a string and an object
Make it string.
Phillip H. Blanton wrote:
The page parser pukes on it every time.
What errors are you getting ? Have you stepped into the code to see what is passed in and what goes back ?
BTW, you can make your method protected.
Also, use Path.Combine to build a path string, rather than trying to keep track of the /'s yourself.
I do notice in my own codebehind that the semicolon after the method name is not needed - have you tried removing it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have tried it without the semicolon as well.
this is the error that I get at runtime. No breakpoints are ever hit.
Unhandled error loading module.
DotNetNuke.Services.Exceptions.ModuleLoadException: External component has thrown an exception. ---> System.Web.HttpException: External component has thrown an exception. ---> System.Web.HttpCompileException: External component has thrown an exception. at System.Web.Compilation.BaseCompiler.ThrowIfCompilerErrors(CompilerResults results, CodeDomProvider codeProvider, CodeCompileUnit sourceData, String sourceFile, String sourceString) at System.Web.Compilation.BaseCompiler.GetCompiledType() at System.Web.UI.UserControlParser.CompileIntoType() at System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation() --- End of inner exception stack trace --- at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound) at System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() at System.Web.UI.TemplateParser.GetParserCacheItem() at System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControlParser.GetCompiledType(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.UserControlParser.GetCompiledUserControlType(String virtualPath, String inputFile, HttpContext context) at System.Web.UI.TemplateControl.LoadControl(String virtualPath) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---
If I remove the line that calls the codebehind method then the page displays but there is no image of course.
Phillip H. Blanton
www.ComponentScience.net
Email: Phillip at that domain that you see one line above the line you are reading now.
|
|
|
|
|
Could dotnetnuke be the problem ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
He! It quite often is.
I poked around a bit and finally got this to work...
<asp:ImageButton id="ibRoles" runat="server" ImageUrl='<%# GetImageLink("pawn_glass_blue.gif") %>' CommandName="Roles" AlternateText="Roles" ToolTip="Edit roles"></asp:ImageButton>
<asp:ImageButton id="ibEdit" runat="server" ImageUrl='<%# GetImageLink("draw.gif") %>' CommandName="Edit" AlternateText="Edit" ToolTip="Edit resource"></asp:ImageButton>
<asp:ImageButton id="ibDelete" runat="server" ImageUrl='<%# GetImageLink("delete.gif") %>' CommandName="Delete" AlternateText="Delete" ToolTip="Remove resource"></asp:ImageButton>
with this...
protected string GetImageLink(string imageName)
{
return Request.Path.Substring(0,Request.Path.LastIndexOf("/")+1 )
+ "DesktopModules/My_Module/App_LocalResources/" + imageName;
}
I don't know what the original problem was due to the useless error message.
And.. for what it's worth, I am not just combining paths. I am yanking the filename off of the Request.Path and then appending the test of the path to it to get the location of the images.
Phillip H. Blanton
www.ComponentScience.net
Email: Phillip at that domain that you see one line above the line you are reading now.
|
|
|
|
|
I would like to enhance a standrd ToolBar by providing an ownerdrawn Panel for the n-most sub-menu item of which will contain icon images that represent various tools (like the MS Word "AutoShapes" dropdown tool selection Panel). This is easy enough to do.
The problem is on MeasureItem and DrawItem, I only have the object coordinates of the item being drawn relative to "itself" not to the screen or client region (From 0,0 to however big the ownerdrawn button will be). I do not have the "actual" screen coordinates in which the rectangular region is being drawn. If I had the screen coordinates, when the end-user performs a mouse click on the ownerdrawn panel (populated with icon images)...I will be able to determine exactly where inside the ownerdrawn region the user click.
Where on the screen or client area is the menuitem being drawn?
Any help would be greatly appreciated.
-------------------------------------------------------
|0,0 (screen) |
| I need -> ?,? |
| this at ---------------- |
| DrawItem. |0,0 (menuitem)| |
| | | |
| | | |
| | 500,500| |
| ---------------- |
| |
| |
| |
| 1000,1000 |
-------------------------------------------------------
Don
|
|
|
|
|