Topics
-
- 3 replies
- 1.2k views
I write a lot of database applications that connect to a MySQL database. I have a UserProfile class that stores the connection settings into this database as constants, which I know can't be very good. Is there a good way to store connection settings in a program?
Last reply by grip003, -
- 1 reply
- 870 views
After reading the sticky and following the links I am still unable to get successful connection to my local db. I can see and modify the SQL data base in the server explorer in .net studio. I do not get errors when it processes the connection string in running code, but when it tries to open the database it says it can not connect and that a possible cause is a database default is not set to allow remoting, which is where I am stuck. I have tried everything I can think of, most of which is playing with user names, permissions and such to no avail. I can not find a setting to allow a remoting option to be set, nor can I find the setup.ini file that is referred to in mo…
Last reply by MTSkull, -
- 2 replies
- 1.4k views
I have no idea why my GridView fields are ignoring my data format string. As you can see, I've tried both a TemplateField and a BoundField, and neither will show the data as formatted: [size=2][color=#0000ff]<[/color][/size][size=2][color=#a31515]form [/color][/size][size=2][color=#ff0000]id[/color][/size][size=2][color=#0000ff]="form1" [/color][/size][size=2][color=#ff0000]runat[/color][/size][size=2][color=#0000ff]="server">[/color][/size] [size=2][color=#0000ff][size=2][color=#0000ff] <[/color][/size][size=2][color=#a31515]asp[/color][/size][size=2][color=#0000ff]:[/color][/size][size=2][color=#a31515]GridView [/color][/size][size=2][color=#ff0000]ID[/c…
Last reply by tfowler, -
- 2 replies
- 1.8k views
I downloaded and installed the Oracle ODP for .NET and then added a reference to Oracle Data Access in my project references. I tried setting a connection using a datagridview control and got an error. So I put the connection information in the form load event just to see where it fails and I get the same error when the application tries to open the connection: "ORA-12154: TNS could not resolve the connect identifier specified" Here is my code: Imports Oracle.DataAccess.Client Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim conn As New OracleConnection conn.ConnectionString = "Password=password;Us…
Last reply by lorena, -
- 4 replies
- 1.3k views
I have made my own custom class to SERIALIZE and DE-SERIALIZE a custom object (kind of complicated, the object contains a custom array of custom objects, etc... lets just say I pretty much had to add [serializable] at the top of all my objects). Now the Serialization seems to work perfectly fine HOWEVER when I attempt to de-serialize the data on the other side (I send the data from the SERVER to the CLIENT via a TCP-Channel) I keep getting some odd errors regarding "objectID cannot be less than or equal to zero" Anyways, this is the class I use to perform my Serialization public class Serialization { static private BinaryFormatter bf = new BinaryFormat…
Last reply by Shaitan00, -
- 1 reply
- 2.5k views
Application - CLIENT / SERVER program (currently working on the CLIENT-side) Background information - On my CLIENT I have a main form (fBoard) that creates & starts a sender thread (thTcpSender) that is responsible for sending data/information (such as a key-strokes, extendable to any kind of object) to the SERVER. So, when the user (on the CLIENT fBoard) hits the UP-Key I need to send the key-stroke information to the SERVER... Now, this is where the fun comes in... I need fBoard to somehow provide the sender-thread (thTcpSender) with the information (in this case the key-stroke "UP" which is a string) and then tell it to send the information to the server.... P…
Last reply by MrPaul, -
-
- Leaders
- 4 replies
- 1.8k views
I was working with my Reflector class when I ran into a little problem, and after a couple of hours of debugging and toying around and researching I can't seem to make any progress. What I am trying to do is access a private field (dialogResult) on an instance of a class that derives from Windows.Forms.Form. I found it very interesting that I could access the dialogResult field from a System.Type that refers to System.Windows.Forms.Form, but not a System.Type that refers to the actual runtime type of my derived form. I found it even more interesting that while I could access the _message field of an exception with a System.Type that refers to System.Exception, I could …
Last reply by snarfblam, -
-
-
- *Experts*
- 5 replies
- 1.3k views
Hi, Here is my xml: <Orders> <Header> <CompanyGUID>026b518c-6916-434a-85ba-88fedce62fac</CompanyGUID> <API_Version>1</API_Version> </Header> <Order SONumber= "123456"> <OrderConfiguration> <StockStatus>Wait</StockStatus> <CanBeQueued>True</CanBeQueued> </OrderConfiguration> <Product> <QuickLinx>123YY</QuickLinx> <Quantity>4</Quantity> <Price>99.99</Price> </Product> <Address> <BusinessName>A made up name</BusinessName> <HouseNoAndStreetName>2 Made Up Stre…
Last reply by davearia, -
-
-
- Leaders
- 4 replies
- 2.4k views
I have a class called vehicledataset which has 130 properties, all strings I have a datatable with two columns, name and value. For example Name Value combined_make Ford combined_model Mondeo ST24 All the items in my name column tie up to the property names in my class. I want to loop through the datatable (i know how to do this using the rows collection) and assign each value to the matching property name in my class. But, I dont know how to refer to the property name dynamically. Cheers Ben
Last reply by Mondeo, -
-
:confused: Any good reference for using vb.net to write ActiveX
Last reply by PlausiblyDamp, -
- 4 replies
- 1.6k views
I have the following simple XML File called getvehicles.xml <?xml version="1.0" encoding="utf-8" ?> <GetVehicles release="8.1" environment="Production" lang="en-US"> <ApplicationArea> </ApplicationArea> <DataArea> <Error> </Error> <Vehicles> <Vehicle> <Combined_Make>VOLVO</Combined_Make> <Combined_Model>70 SERIES C70 T5 GT</Combined_Model> </Vehicle> </Vehicles> </DataArea> </GetVehicles> I need to read the combined _make and combined_model tags. I have this code Dim file As String = Server.MapPath("getvehicles.xml") Dim doc As New XmlDocument …
Last reply by Mondeo, -
-
- Administrators
- 5 replies
- 2.6k views
I have a dataset with a column "KeyName". I need to filter my for each loop on this if I can. For Each oDataRow In oDataSet.Tables(0).Rows 'code Next Something like this... e.g. For Each oDataRow In oDataSet.Tables(0).Rows (where "KeyName = 'SomeValue'") 'code Next The reason I need to do this is THIS For Each loop is nested inside another one where I am looping though each "KeyName" in an XML Document. Looks like this. For Each lo_node In lo_nodeSet.SelectNodes("attachments") lo_attachments = GetDataElement(lo_node, "attachments") ls_name = lo_attachments.GetAttribute("KeyName") 'some code For Each oDataRow In oDataSet.Tables(0).Rows (wh…
Last reply by FZelle, -
-
- 1 reply
- 1.1k views
Hi all, Since our project have to support legacy VB6 client also, I created COM+ using .NET. First time I create COM+ using .NET 1.1 version. VB6 client calls the COM+ Application class and calls Exectue4VB() method. There was no problem. I test it all and worked as expected. We decided to convert COM+ code using .NET 2.0. However when I converted the code to .NET2.0, it stops work!! So, I created small test COM+ and test vb6 client. It doesn't work. It works perfectly ok with COM+ written in .NET1.1. Error is : Object doesn't support this property or method It's so wired. What is problem? .NET2.0 doesn't support it anymore or what? It's same code. …
Last reply by goodmorningsky, -
-
- Leaders
- *Experts*
- 4 replies
- 2.4k views
Hi I have a richtextbox with a textchanged event. This event fires when the text box is first loaded with data, understandably. This is the code: Private Sub rtfText_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rtfText.TextChanged bHasChanged = True End Sub I dont want bHasChanged to be set to true, upon loading, just when the user changes something. This value is then checked upon closing, and uses it to determine whether to prompt about saving changes. I can solve this by having a 'bFirstLoad' like below: Dim bFirstLoad as boolean = True Private Sub rtfText_TextChanged(ByVal sender As Object, ByVal e As S…
Last reply by snarfblam, -
-
-
- *Experts*
- 2 replies
- 1.5k views
This is a simple Windows Explorer Bar Component sample. Since this component is not included in the VS.NET 2005, many programmers may want to implement it in their programs. You can customize it to meet your requirements. - A moderator move it to the following forum, please: Code Library http://www.xtremedotnettalk.com/forumdisplay.php?f=9 Explorer Bar.zip
Last reply by OMID SOFT, -
-
-
- Leaders
- 3 replies
- 8.2k views
I am using VS2003, and I am trying to open a form in a new thread. What I have done is started a new thread from the main one, and in that thread I create a new form. The new form is used to display some loading results from the main form, but when I show the new form I just get an hourglass and I can't press the cancel button. Here is the simple idea: Show the main form. Start a new thread in the main form for loading. In the new thread, create a 2nd form to display some loading results. While the 2nd form is shown, I want the ability to cancel the loading operation. Does this seem possible?
Last reply by grip003, -
-
- 2 replies
- 3k views
There was a well known bug in PageSetupDialog in Framework 1.0 and it is still there in 1.1 when using metric measurment system: For example show the pagesetupdialog and set the left margin to 25.4 mm (1 inch) and press ok. Now show it again and the value is now 10 (divided by 2.54 to be converted to inch and set the print document margin which is measured by 0.01 of inch, but not converted back to mm at subsequent ShowDialog). Does anyone know of a work around for this? How do you change the measurements from millimetre to inch?
Last reply by davidrobin, -
- 3 replies
- 1.6k views
Hi all I am downloading a .csv file will some data in it. The code that I am using is as follows: Private Sub DownloadFile(ByVal filePath As String, ByVal fileName As String) Dim fs As FileStream ' Open the file. fs = File.Open(filePath, FileMode.OpenOrCreate) Dim byBytes(Convert.ToInt32(fs.Length)) As Byte fs.Read(byBytes, 0, Convert.ToInt32(fs.Length)) fs.Close() ' Delete the file from the system. If Not fileName = "SampleCSV.csv" Then File.Delete(filePath) End If Response.AddHeader("Content-disposition", "attachment; fileName=" + fileName) Response.ContentType = "applicat…
Last reply by mike55, -
-
- Leaders
- 2 replies
- 1.1k views
I have a simple form with a toolbar and a PrintPreview Control. When I add the PrintPreviewControl at design time and set the Dock to Fill, it fills the space available nicely. But I want to add the control at run time, because that seems to be the only way to refresh the PrintDocument that it contains without reloading the form. However when I do this and set the Dock to Fill, the PrintPreview control extends up underneath the toolbar so is partly obscured. How can I fix this?
Last reply by rbulph, -
-
-
- Leaders
- 10 replies
- 1.2k views
int[] array = new int[10]; int number = 0; array[number++] = number++ // array[0] = 1; array[number++] = number++ // array[2] = 3; array[number++] = number++ // array[4] = 5; etc... Why is the destination visited before the expression?!?! Isn't that counter intuitive? I know it probably has something to do with the parsing order, but I just found it bothersome.
Last reply by snarfblam, -
-
Who's Online 0 Members, 0 Anonymous, 49 Guests (See full list)
- There are no registered users currently online