Topics
-
- 5 replies
- 1.1k views
Hi, I have problem when i try to add File to MySQL DB(ver. 4.1.15) What Type should be the collumn? ... void InsertFile(byte[] byData) { string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" + "SERVER=127.0.0.1;" + "DATABASE=customers;" + "UID=root;" + "PASSWORD=*****;" + "OPTION=3"; OdbcConnection MyConnection = new OdbcConnection(MyConString); MyConnection.Open(); string mySelectQuery = "INSERT INTO FilesDB (Path, File) VALUES ('C:\test', byData )"; OdbcCommand myCommand = new OdbcCommand(mySelectQuery,MyConnection); myCommand.ExecuteReader(); } .... i've tryed this code. N.B. The file is Binary. Any suggestions? Thank you, RL
Last reply by RedLeader, -
-
- Administrators
- *Experts*
- 7 replies
- 954 views
Is there a way to write out a sql statement to the debug window at runtime and have it with the values for params in it instead of just the names of the params?
Last reply by Nerseus, -
-
-
- Administrators
- 1 reply
- 880 views
I'm working on a custom server control and have a component I created that is a property of this control. If I manually (in code) set the property, everything is great - if I let the desinger do it, in the html it properly assigns a value, but when the page renders I get the following error: Unable to generate code for a value of type 'MyComponentName'. This error occurred while trying to generate the property value for ThePropertyMentioned - this happens before the constructor for that component is even called...so I don't know what .NET is trying to do. No other custom properties of the control have this problem; but they're simple native types. I googled the …
Last reply by PlausiblyDamp, -
-
- 2 replies
- 801 views
Hello I am programming in VB.NET and I Have created a DataGrid with a column containing CheckBoxes. I have three question: 1- At the first, all Checkboxes are checked, how can I Uncheck them. When I Uncheck Any Of Them with clicking on it, And then I click Somewhere else in the form, Suddenly it will be checked again. 2- How can I check the status of every individual checkbox, I mean I want to know whether any of checkboxes are checked or not. 3- How can I change the status of any check box from my program. For example, I want to check one of the checkboxes or vice versa. Also I have Checked The George Shephered's FAQ, But I couldn't find My answers Tha…
Last reply by Nate Bross, -
- 3 replies
- 813 views
Response.Clear() Response.Buffer = True Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("Content-Disposition", "attachment; filename=UserList.xls; sheet=Sheet2") Response.Charset = "" Me.EnableViewState = False Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriter Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter) dgSearchResult.RenderControl(oHtmlTextWriter) Response.Write(oStringWriter.ToString()) Response.End() The original code I got from this very firm and I modified it to the one above. Now the problem …
Last reply by kahlua001, -
-
- Administrators
- 4 replies
- 609 views
Stuck on a bit of reflection.... Hi all, I'm not 100% on what to do here so hopefully someone can help out. I have a class that has various objects on it. These are one of the following... stringAttribute doubleAttribute integerAttribute and each on holds a field from the database (obviously this is loaded into C#). On these there is a property called ReadOnly. Where it is one of these properties I'd like to get ReadOnly to whatever is passed in. I'm not sure how to do this a rough guess is below. Am I along the right lines??? Thanks! Tim public void SetReadOnlyForAllAttributes(bool readonly) { Type MyType = Type.GetType(testclass); MemberInfo[] MyM…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 3 replies
- 569 views
Hello, Is it possible to give a parameter to a VB.Net assembly? I want to call a vb.net assembly from a asp.net page. and give a value with it. and retreive that value in the assembly... How can i do this? thx, interw
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 10 replies
- 1.1k views
When I run my app on my local box it works fine. Whenever I run the app from the web, I get:"Server Error in ..." "Input string was not in a correct format." An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. This always happens whenever I click any button that requries validation. IE it should show text in the validation summary box that says something like "You must enter a number between 1 and 10", instead I get the above. Note:Web.config <customErrors mode="Off"/> Any have an idea of what I'm doing…
Last reply by PlausiblyDamp, -
-
- 10 replies
- 1.2k views
hi, i am just totally a newbie for vb.net, here is a simple question which i don't know how to solve it. i have a button here, how am i able to add a dialog box to perform browser function? thx !
Last reply by rfazendeiro, -
-
- Administrators
- 3 replies
- 811 views
Hi, I have this query I would like to change the date "20/10/2005" with a keyword or other instruction. I'm under VB.NET 2005 B2 and I can't find exactly word : I tried = { d }, datetime, date.now but nothing. Thanks a lot in advance for help. Pascal T. New Caledonie
Last reply by PlausiblyDamp, -
-
- 6 replies
- 8.8k views
Hi everybody, I have to use MSScriptControl in my Application. First I added the reference to MSScriptControl, of course. Then I created some objects and a ScriptControl. When I try to add the objects to the ScriptControl I get an Exception. Dim script As New MSScriptControl.ScriptControl In Button_Click: dim oTest As New Object dim btnTest As New Button script.AddObject("form", Me, True) 'this works script.AddObject("object", oTest, False) 'works, too script.AddObject("button", btnTest, False) 'Exception script.AddObject("otherButton", Me.Button1, False) 'Exception Why do I get this Exception: An unhandled exception of type 'System.InvalidCastExce…
Last reply by Hykke, -
- 7 replies
- 1.4k views
I have a simple form that has a listview that is populated by a table in access. There is a button that opens another form using showdialog so that the first form stays in the background. The second form is used to add a value to that same access table. When I click the add button I want the value to be added, the current form to close and the new value to show in the listview. Everything works except the new value does not show, if I stop and then start the project the value appears. So I just need to refresh the listview which is being populated on formload. I have tried to use the refresh and update command, but to no avail. Any help is greatly appreciated. Thanks
Last reply by Diesel, -
- 5 replies
- 729 views
I am sure this has been covered, but I cannot find it. I am in the process of learning vb.net and I am working with a listview that is populated by an access table. I want to be able to pass the id of a selected item to another form in order to do another query based on that value. I am having trouble. Any help would be great. Thanks
Last reply by durilai, -
- 1 reply
- 1.2k views
i know if i do this Private Sub FilesList_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles FilesList.DoubleClick Dim Singer() As String 'InputBox("Singer?" = Singer(0) + 1) LstKaraokeQue.Items.Add("name") it will add the word name to the list box LstKaraokeQue. i dont want it to do that i want it to add the filename i have clicked on and add it to the list the bit what is commented out i want it to ask me for a name first and add it to the front of the file name in LstKaraokeQue can someone help ??
Last reply by mskeel, -
-
- Administrators
- 5 replies
- 810 views
Hi, I'm googled out! How to pass email data from one function to another in a windows service. For Example: From, To, CC, Date, Subject, Body, ReplyTo, Attachment path, etc. Arrays, collections, tables....I just don't know which one is a good fit. The service gets new email from a pop3 server and creates support cases using the data in the email (From, To, ...). I would appreciate help on how to store and pass that data between functions, etc. Email size will be minimal but there will be numerous email to deal with. Thank you, Aaron
Last reply by PlausiblyDamp, -
-
- 5 replies
- 3k views
I hate how the default TreeView contracts nodes that I have manually expanded. What I mean is that I expand two different parent nodes to see the child nodes. If I then click on one of the child nodes, the other parent node contracts. I don't like that. I expanded it, it should stay expanded. Is there any way to override this functionality? I tried putting ExpandAll in the Click event, but then it flashes with every click...you can actually see the nodes contract and then expand back out. Thanks for the help, Todd
Last reply by tfowler, -
- 0 replies
- 993 views
Greetings to all. I'm building a MSPaint style simple paint program, and i'm trying to implement custom cursors for the different drawing modes (line, square, fill etc). Problem is, any custom cursor i create and then assign for a particular control (in this case a picture box, which is acting as my drawing canvas) is not visible. I have made sure to make the created custom cursor as an embedded resource, and I know that the code that is calling for the cursor is ok, as the call is made and the cursor changes from the regular pointer to an invisible one. The invisible cursor still functions as normal, i.e. I am still able to draw on the canvas with it etc. Any ideas…
Last reply by perps, -
-
- Administrators
- 1 reply
- 1.4k views
Many of us by now know it but I just came to know this fact..... You can not create folder bearing the name "CON","PRN","AUX" etc in windows Microsoft says that these are reserved keywords for DOS and hense could not be used as folder names But then aren't COPY, PASTE, CD etc reserved keywords for DOS, then why can we make folders with such names Ashutosh
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 3 replies
- 2.8k views
Dear all, I have a problem when dealing with transparent key of main form and controls on the form. I set an background image for a form and then set the TransparencyKey of the form to Color.Red so that the red region on the background image becomes transparent. I placed picturebox on the form and the picturebox is used to display image selected by user. I found that the red region in the image of the picturebox becomes transparent as well but what I want to do is only make the red region of the main form to be transparent and picturebox remains unchanged so that the picture will be displayed correctly. Could anyone suggest how to make controls on the form remain…
Last reply by vincentchang, -
-
Where r u from? 1 2
by Benato-
- *Experts*
- Leaders
- 26 replies
- 3.5k views
I am new here and was wondering where most of the ppl here r from...
Last reply by snarfblam, -
-
Who's Online 0 Members, 0 Anonymous, 52 Guests (See full list)
- There are no registered users currently online