1,576 Posted Topics

Member Avatar for A0110
Member Avatar for varoluscu_prens

I normally use pwd in place of password but I don't know for sure if using password causes MySql to throw an error. But that is the only thing I can see wrong with your connection string - unless your database name is wrong.

Member Avatar for G_Waddell
0
222
Member Avatar for auwi987

This link will show you one way of doing it using the overloaded fill method of the dataAdapter. http://csharp.net-informations.com/datagridview/csharp-datagridview-paging.htm

Member Avatar for hericles
0
89
Member Avatar for king03

Basically, yes. Drag two tetxboxes and a button onto your form and double click the button to open the button_click event in the code window. Add your code into that method and replace the two lines where you read in the user's input to instead access the text in the …

Member Avatar for hericles
0
168
Member Avatar for mani508

The simplest way to do that is to add the google search box to your page - is that what you want? Search 'add google search to webpage' and you'll find links to the HTML code you need to add. Hereis one link that quickly shows how to do it: …

Member Avatar for JorgeM
0
204
Member Avatar for c#_fem

If it is for a web form you would normally use <asp:Image>. In the button click code you would set the imageURL to display the correct image.

Member Avatar for hericles
0
94
Member Avatar for queendaedra

It looks like you just need to change the float of the menu as it is currently set to float: right; I'd follow the advice at the top of the CSS file and add a new CSS file after this one that has the new CSS rules in it. That …

Member Avatar for queendaedra
0
312
Member Avatar for babydol

It seems to me you have your logic round the wrong way. If the data reader can't read then there are no rows so the user name isn't entered. If the reader has rows then the name is taken and you inform the user of that. You need to swap …

Member Avatar for babydol
0
136
Member Avatar for omotoyosi

If in doubt about any connection string head to www.connectionstrings.com. You'll find how to connect to any database.

Member Avatar for hericles
0
93
Member Avatar for Maha Sh.

It looks to me like your SQL statement is wrong. Where you use a join the ON clause is meant to specify which columns match but you haven't done that. You have 'ON PateintTbl.SLP_ID = Session(logAccount)' This should be: ON PateintTble.SLP_ID = SLP.someMatchingColumn WHERE SLP_ID = ' + Session(logAccount) + …

Member Avatar for Maha Sh.
0
209
Member Avatar for kmpoaquests

HTML 4 or 5 on an iPhone/iPad/Android shouldn't be a problem for this. Most problems with websites on mobile occur with using CSS attributes like HOVER or absolute positioning. Design the page well and you won't have any issues. The first part is pretty standard. The user enters the text …

Member Avatar for hericles
0
248
Member Avatar for manshaf

I'm assuming you have the status of order kept in a database. When the order is entered into the text box, take that value and use it to query the database to retrieve the order status. Once you have that use a switch statement or something similar to match the …

Member Avatar for hericles
0
71
Member Avatar for kikiritce

You need to use the text property of the text box if you want to access the text the text box contains. You are including the textbox itself in the list, not what it contains. lstNewValues.Add("OfferID", txtOfferID.text); You are seeing that error because a text box control cannot be converted …

Member Avatar for hericles
0
244
Member Avatar for westerncj

Yep, just add more parameters, one for each column you want to include in the search.

Member Avatar for westerncj
0
106
Member Avatar for cyberdaemon
Member Avatar for lhsunshine

First off, debug your code and see what value is being put into temp. If the user name was in your database twice then temp would be more than 1, if it isn't there at all then temp won't be 1 either.

Member Avatar for kvprajapati
0
166
Member Avatar for Maha Sh.

Data.CommandBehavior.CloseConnection returns an enumeration (the number 6 from what I just looked up on MSDN). This means you are in effect calling Dim result As Data.SqlClient.SqlDataReader = dr(6) Which probably doesn't exist as your dr has 6 items or less. As you already have the dataReader set up I'm not …

Member Avatar for Maha Sh.
0
263
Member Avatar for collin_ola
Member Avatar for collin_ola
0
182
Member Avatar for lxXTaCoXxl

come on man, don't put up your euler solutions. Other people that can't solve it are just going to copy your answer which just weakens the site. You can see other people's solutions on the site once you've solved a particular problem anyway. I've noticed the Python solutions on the …

Member Avatar for Momerath
0
171
Member Avatar for jazz1011

When your user logs in create a session variable that holds the user_id (or whatever defining information you want) like this: Session["user_id"] = "some data"; Then you can access that at anytime during the user's session with this String user = Session["user_id"].ToString();

Member Avatar for hericles
0
129
Member Avatar for GFX010

Try using the server.mapPath() method to point to the file location if this is a web project. This will look for the folder and file in relation to its physical location to the root folder

Member Avatar for GFX010
0
165
Member Avatar for emilio

You would only want a singleton class if the information being supplied by the web service is the same for everyone. Having multiple business logic instances created (one per user) isn't (shouldn't be) an issue. That is how web servers are designed to work. Its the same as the server …

Member Avatar for hericles
0
161
Member Avatar for BenVoigt

What code you are referring to exactly? If you post up code on a webpage as a tutorial or similar then yes, it will get used by other people if its any good. If you are referring to production code getting screen scraped I'm not sure how that would happen. …

Member Avatar for BenVoigt
0
81
Member Avatar for mani508

You will want to look into installing and using the AJAX control kit for your version of Visual Studio (I think the 2010 version differs from 2008 but I could be wrong). Then it is just a matter of setting up the control kit on the page and specifying which …

Member Avatar for mani508
0
223
Member Avatar for M.Waqas Aslam
Member Avatar for hericles
0
110
Member Avatar for jateshs1007

You can store name/value pairs in session state very easily. Once you have logged in a user you can set the ssions variable like this: `Session["loggedIn"] = "true";` You can then later alter the session variable or check it for logged in status. In your global.asx file you can specify …

Member Avatar for hericles
0
167
Member Avatar for jcgldr

The solution here may help: http://wallism.wordpress.com/2009/12/29/clickonce-exception-reading-manifest-from-file/

Member Avatar for hericles
0
578
Member Avatar for Maha Sh.

Try using the getString() method of the reader with the column number. E.g. logID = dr.getString(0) PassW = dr.getString(1)

Member Avatar for Maha Sh.
0
234
Member Avatar for livefortech

Here is what I did to make the 3 sections display beside each other; take out the extra DIV around the contact form, shrink the width of the object down from 100% to 70 or 75 (whatever works best for the size of the object being embedded) move the object …

Member Avatar for hericles
0
118
Member Avatar for rashid_khan

To generate barcodes you can use free3of9 barcode font. Its completely free and I've used on several projects to create scanner readable barcodes.

Member Avatar for Jeff-Bennett
0
174
Member Avatar for kairoland

You can see your mistake in the error message. Pay close attention to the quotes and you'll see you aren't placing them in the correct positions. > You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to …

Member Avatar for kairoland
0
431
Member Avatar for Hakoo

You haven't added your HTMl so its hard to actually see what is wrong but if you have a <DOC> declaration below your aspx page and register directives it should be detected. Actually, are you passing the validator the actual aspx file or validating the page online (passing the URL)? …

Member Avatar for mikev2
0
241
Member Avatar for Verygoodguy

I'm assuming the text box is going to show more information than you have already extracted from the database i.e. another SELECT statement is needed. You can improve the usability by removing the radio button and using a link button for the name. Then the user just needs to click …

Member Avatar for hericles
0
362
Member Avatar for jakeb1989

Well, the web.config file is just an XML file. You can open it and alter the contents the same way you could to any other file. You can use a regular expression or path to locate the password in the file, overwrite it and save the file again.

Member Avatar for hericles
0
111
Member Avatar for Sahil89

The data reader is a forward only way of moving through the data extracted. You can use other types if you want to be able to arbitrarily select a position. The dataTable can be referenced by iterating through the rows so moving back forward is easy.

Member Avatar for Sahil89
0
105
Member Avatar for zemzela

Go to your project in the explorer and right click, you'll see the menu item 'add reference'. In the window that opens up browse to the DLL you you need and click OK. Once the DLL is referenced add a using statement to your class.

Member Avatar for hericles
0
175
Member Avatar for Maha Sh.

If you want to store your connection string in the app.config or web.config you normally place in the correct section and give it a name. You then use the ConfigurationManager to locate the connection based on the name. You haven't done that. In essence you have told it to look …

Member Avatar for hericles
0
302
Member Avatar for olegb

ZeroZen is right in his answer. If you can move it all to server code managed (and called) directly by the aspx page then do it. A web service can work just as well, better in fact if you want different websites/services to call it. Your webpage calls the web …

Member Avatar for hericles
0
250
Member Avatar for dilse4sk

Does your dataGridView have at least 4 rows and columns? It may be that it is crashing because position (3,3) doesn't exist.

Member Avatar for hericles
0
105
Member Avatar for Iamateur

If you want to get all of the rows out of a database for a particular column use either a dataReader or a dataAdapter to hold the result of your SQL statment (SELECT column_name FROM database;) and then loop through the reader or adapter adding each item to the combo …

Member Avatar for Begginnerdev
0
131
Member Avatar for millsasbc

Which line is throwing the error? MSDN says an InvalidCastException can be thrown when you try a conversion from a Single or a Double to a Decimal, the source value is infinity, Not-a-Number (NaN), or too large to be represented as the destination type. Could it be the divide part …

Member Avatar for millsasbc
0
162
Member Avatar for zspoja

You need to make sure neither the selected start or end date of tenancy is the bookings table to ensure the apartment is free for that period. Assuming you have two inputs for the start and end dates this should work: [code] SELECT apartment_id FROM apartments AS a JOIN bookings …

Member Avatar for zspoja
0
737
Member Avatar for ZeroZen
Member Avatar for hericles
0
210
Member Avatar for rogerg

If I understand you correctly you want to be able to display a PDF on screen in a browser and have a user enter comments. The first part is easy, browsers display PDFs naturally so you just link to the PDF. To have the PDF and the ratings/comments section on …

Member Avatar for rogerg
0
230
Member Avatar for ubercat

You're looping through item1 and item2 to compare each item but then actually comparing DDL.SelectedItem against LBX.SelectedItem (which is the same comparison each time). You should be comparing item1 against each item2 or DDL.SelectedItem against item2 and then removing if they are the same.

Member Avatar for ubercat
0
2K
Member Avatar for showman13

SELECT mem_id FROM members WHERE mem_id NOT IN (SELECT mem_id FROM position_1) would give you the men_id's in members that aren't in position_1. You can extend the NOT IN (SELECT... to include the other position tables using a standard JOIN. The result (untested) should be those mem_id's that only feature …

Member Avatar for smantscheff
0
233
Member Avatar for katherinedamon
Member Avatar for Kniggles

SELECT * FROM table_name ORDER BY rand() Note that this is apparently intensive on the server due to the way random works. You maybe better off to extract the data and randomize in code, especially if you want to output it in a particular way.

Member Avatar for Kniggles
0
113
Member Avatar for IKhan123

Do you need the two dataTables? It sounds like you could alter what you extract from the database to include eveything you need. If that isn't possible you can use the Merge method to merge two dataTables with differing schemas. That should help. The MSDN articles are pretty useful for …

Member Avatar for IKhan123
0
114
Member Avatar for Aviplo

The End.