hericles 289 Master Poster Featured Poster

OK, if you have declared your connection string as a string you would access like this:

Dim connectionString As String()
    connectionString = 'your connection string'
    Dim conn As SqlConnection = New SqlConnection(connectionString)

If you have entered your connection string into the code then you don't need to use the configuration manager as the connection isn't located in the app.config file.

If you have added the connection string to th app.config file you will have a section that look like this:

<?xml version='1.0' encoding='utf-8'?>
    <configuration>
    <connectionStrings>
      <clear ></clear>
      <add name="Name" 
       providerName="System.Data.ProviderName" 
       connectionString="Valid Connection String;" ></add>
    </connectionStrings>
    </configuration>

Now you can use the configuration manager to locate the element with the name 'Name' (for example).
If you are having trouble with the idea of app.config files and the storing of connection strings I would suggest typing '.net app confg connection string' into google and reading the MSDN articles that come up.

Hope that helps,

hericles 289 Master Poster Featured Poster

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 screen at the same time link the PDF to an iFrame and have the comments below it (or above it). Then you can have both things on the one page and easily viewed by the user.

rogerg commented: thx, I'll give it a try +0
hericles 289 Master Poster Featured Poster

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.

Kniggles commented: :@) ty +1
hericles 289 Master Poster Featured Poster

javascript is the easiest solution if you simply want to print exactly what is on screen.
include a link (or button) somewhere on the page that looks like this:

<a href="javascript:window.print()">Print page</a>
JorgeM commented: simple, yet effective advice! +3
hericles 289 Master Poster Featured Poster

We can't help you with these questions without knowing depth what you are you are trying to do. You need to make the decision based on your requirements and what information you want to save and use. If you want to be able to link products to certain categories then yes, you will need a data store that allows you to do that.

hericles 289 Master Poster Featured Poster

Hi,
Your question isn't very well worded. But I'm guessing you are asking what database tables should make up your database. That depends entirely on what data you are trying to capture. Generally you would give the table a name that descriptively explains what the table stores whilst keeping it short. So if you had an application that recorded customers and their orders you would have tables for Customers, Products, Orders and at least one more for recording the individual items that make up an order.
Does that make sense?

hericles 289 Master Poster Featured Poster

TRUNCATE persons; will clear out the table and reset the auto_increment primary key to zero.

hericles 289 Master Poster Featured Poster

Where is getNumber being called from? I imagine it would be part of the main method so the rest of the code has a number to work with but I can't see where you are calling it from.

hericles 289 Master Poster Featured Poster

You have sor in quotes for a start. Is that a typo or part of your code because it, at the very least, should be:

url = sor + "resources/stdInfo/authenticate/" + tx.Text + "/" + passwordBox1.Password+ "/1/570322308ce1121cba1b93f5acc9ebd4733ef2bca90ef942a2cfa224f0aa08dc/1";

NPDA commented: thanx alot:) +1
hericles 289 Master Poster Featured Poster

If you want to include StartingWorkDay in the where clause the SQL would be

SELECT * FROM Employees WHERE EmployeeId = '" + txtID.Text + "' AND StartingWorkDay = '" + txtStartingWorkDay.Text + "';"

you may have been missing the AND and using a comma?

hericles 289 Master Poster Featured Poster

Hi,
To increment the id_Student column all you needed to do was define the column as the primary key with auto increment. Assuming the id_Student is an integer data type the declaration would have been:

create table some_table(
id_Student int not null primary key auto_increment,
....)

Now whenever new data is inserted you don't include a value for the id_Student, mySQL will increment it automatically. You can alter the increment rate if the default of 1 isn't what you need.
As for searching and displaying data from a database you'd be better off looking for a tutorial online to show you how to do that. There are many to choose from.

hericles 289 Master Poster Featured Poster

No, you shouldn't hold two pieces of data in the same column. Having design and web in the same column matched against dreamweaver (for example) is incorrect.If you wanted to do this you would need at least 2 tables.

table 1: software
software_id
software_product
software_desc

table 2: software_uses
software_id
usage

So, in table 2 for dreamweaver you would have two rows (based on your example above and giving dreamweaver an id of 101).
software_uses
101 web
101 design

Now you can search for any software that matches a particular need and retrieve the name and description from table 1 using an SQL join.
Does that help?

Biiim commented: id say same +4
hericles 289 Master Poster Featured Poster

First thing to do would be to debug the code at the line comparing the two. Visually confirm they are the same.

Lusiphur commented: Thanks for at least trying :) Nobody else seems to have any thoughts on this one. +9
hericles 289 Master Poster Featured Poster

Its been a while since I've done that but the CSS should be:
background-attachment: fixed

dantinkakkar commented: Didn't deserve a downvote IMO. Upvoted +repped here. +4
hericles 289 Master Poster Featured Poster

In your post above where you said you still got the error you had renamed the command object to asccmd instead of acscmd.

Dim acscmd As New OleDb.OleDbCommand ' the oledbcommand
        acscmd.CommandText = strsql 'sets the sql string
        acscmd.Connection = acsconn 'sets the connection to use the oledbcommand
        acscmd.ExecuteNonQuery() ' execute oledb commands non query only
        acscmd.Dispose()

Copy that code and use it, you shouldn't get an error.

ARG!! beaten to it ;)

hericles 289 Master Poster Featured Poster

Maybe you have that cmd object declared elsewhere but from what you posted the name of the command object is wrong.

Dim acscmd As New OleDb.OleDbCommand ' the oledbcommand
 acscmd.CommandText = strsql 'sets the sql string
 acscmd.Connection = acsconn 'sets the connection to use the oledbcommand
 cmd.ExecuteNonQuery() ' execute oledb commands non query only

You declare and set parameters for acscmd but then call the executeNonQuery on cmd.

kingsonprisonic commented: +1 for eagle eye.... +5
hericles 289 Master Poster Featured Poster

The simplest way is to add a roles column to your database table (or create a separate table to hold this info) so when they log in you can extract which role they belong to.

hericles 289 Master Poster Featured Poster

You are missing the keyword COLUMN:

cmd = New SqlCommand("ALTER TABLE " + ddl_sub.Text + " ADD COLUMN " + txt_desc.Text + " varchar(50) ", con)
kvprajapati commented: Yep :) +15
hericles 289 Master Poster Featured Poster

I'm not an expert with any of them (and haven't used Joomla at all) but it depends on what you want to use it for. Wordpress is good for blogs, article sites, stuff that has a lot of content served dynamically but doesn't require too many add-ons or e-commerce. Thats just my opinion - others will argue.
Drupal has a massive amount of plug-ins and modules, there's nothing you can't do. It is incredibly extensible but that can also be a curse. It is great for e-commerce and functionality similar to that but is almost always overkill for sites that are merely dynamic in nature and don't need specialized modules.
Just try updating it when you have extra modules added and you'll see what I mean.
Anyway, I hope that helps.

hericles 289 Master Poster Featured Poster

Whenever you need to join tables you use the JOIN command and then specifiy which columns in the joined table form the linkage (are the same).
For your tablesto get stuid and subname the query would be:

SELECT mm.stuid, sm.subname FROM markmaster AS mm JOIN subjectmaster AS sm ON mm.subid = ms.subid;

The AS command lets you give shorter aliases to a table if you didn't already know. And you can specify a WHERE clause on the end if you need to. You should be able to add in the exammaster table from there, just use another JOIN and ON statement.

rch1231 commented: Short and sweet and a good example. +9
hericles 289 Master Poster Featured Poster

Simply reverse your loop. Set num1 to 9 and subtract from num1 in each loop. And change your loop criteria so it stops at zero.
That should be enough hints to help you:)

hericles 289 Master Poster Featured Poster

You have referred to the table as Price_Ranges and PriceRanges. Which one is correct? If it is Price_Ranges in the database then no, dbo.PriceRanges does not exist.

hericles 289 Master Poster Featured Poster

Instead of ApplicationPath try Server.MapPath. This will give the location relative to the server files (within IIS or whatever server you are using) instead of the location of the files on disc ,which is what ApplicationPath is giving you.
Server.MapPath will give the location from localhost, instead of from the C drive.

hericles 289 Master Poster Featured Poster

You have just asked us for a LOT of help and, to be honest, this is pretty ambitious for your first web app. If you really want to proceed with this break it down into its component parts.
Pick one part (registration or creating the auction maybe) scope it out, plan your work and begin. Once you hit a real problem in a particular aspect of the development let us know. We'll help you with that.

mani-hellboy commented: fine reply +0
hericles 289 Master Poster Featured Poster

OK but to record that kind of change to a task your are simply updating the record for the particular task. I'm not sure what you expect the code you included in your first post to do.
For example you are SELECTing the work record out of the database for the supervisor and manager to view and change. If the supervisor signs of on the work then the record is updated to reflect the change and probably the date signed off.

hericles 289 Master Poster Featured Poster

If you want to get the max value from one column you don't need to bother with the dataTable or dataSet at all. SELECT MAX() returns the max value so just parse the result from the executeScalar() command.
But, beside that, seeing you aren't using parameters check your column names are correct.

hericles 289 Master Poster Featured Poster

Use the HttpUtility.UrlEncode(String) method. It will take the string and turn the special characters into URL compatible code.

hericles 289 Master Poster Featured Poster

Well, it is a paid service hence the license key. You could always purchase the software...

hericles 289 Master Poster Featured Poster

Well you could make subclasses wood, gold, stone and food of the super class Resource. essentially they would be basic classes and use the implementation of the Resources class for most things, unless something specific arises. But then you would have easily identifiable classes in code that follow similar rules.

hericles 289 Master Poster Featured Poster

Your blog_id will need to be inserted, most probably from a variable that you have stored on the page. The name you give it is up to you. We were both just saying that your SQL statement was incorrect in including a WHERE clause.

hericles 289 Master Poster Featured Poster

When you select your data from the database use a WHERE clause to specify only rows that have a matching value in a particular column.

SELECT * FROM table1 WHERE brand = 'Nokia';
hericles 289 Master Poster Featured Poster

I think the OP was referring to parsing the user input and using some form of language syntax rules to build an SQL statement from the words entered. This is very difficult to do properly and I would be tempted to use the drop down list method suggested above. Maybe not as cool and a little clunky, but at least it is easily achievable.

hericles 289 Master Poster Featured Poster

Its perfectly logical. It is how most sites handle their internal messages. There is no need to over think it. You can include all the functionality of emails (bcc, cc, attachments, replies, etc) as well.

hericles 289 Master Poster Featured Poster

Do you want them to send an actual email (i.e. the message appears in their email account) or send a message to the user the next time they access your app (message sent and held by your software)?

mmazeemahmad commented: thnaks +1
hericles 289 Master Poster Featured Poster

To err is human but to really f**k up you need a computer.

hericles 289 Master Poster Featured Poster

Well, if it is a web app it needs to be installed on a server like IIS. If you simply moved the files to another computer and expected them to run, that won't work.

Begginnerdev commented: True! Found this out the hard way. +3
hericles 289 Master Poster Featured Poster

If that is the case, and the components aren't a part of your program, you may need to create a custom msi that includes the dependencies. I'm not very familiar with devExpress so I can't give too much advice about that.

hericles 289 Master Poster Featured Poster

I see you're using an IP address. Is the database on a remote machine rather than local host? Maybe you need to include a port number? And try changing password to pwd as well. A handy site for locating the format of connection strings is http://www.connectionstrings.com. It has every connection string you will ever need.

hericles 289 Master Poster Featured Poster

Practice, practise, practise. It takes time unfortunately, no quick fixes here. Decide on an area you don't know well and learn something new. Build completely useless apps that use XML save to and read from a file, use drawing to make a ball bounce around the screen. You get the idea.

hericles 289 Master Poster Featured Poster

You have a comma directly before FROM in your SQL statement. You need to remove that.

discovery-power commented: much appreciated, thanks +3
hericles 289 Master Poster Featured Poster

Its probably the lack of a space between Val(TextBox2.Text) & "where name='" because its going to join the TextBox2.Text to where e.g. someValuewhere name = ....
And feel free to create your own posts, there's no need to hijack someone else's.

hericles 289 Master Poster Featured Poster

Firstly, do you really want to create a new table for every user just to record their name, link and description? If your site/app becomes even reasonably popular that amounts to a lot of tables. That data can easily be kept in one table for everyone.
If you need to create the table (I'm assuming in the ELSE part of the loop) it the same as executing any other scalar operation on the database. Set your SQL string and use the command object as you already have done to insert or extract the data.

hericles 289 Master Poster Featured Poster

As someone who posts here a fair bit I can tell you that seeing the word urgent in the title does nothing to make me frantically rush to help the poster. I don't really care if your problem is urgent. I still want to help or I wouldn't be here. A well worded post with adequate information about the problem is far more likely to attract advice than one with a minimum of words.
I'm not going at you in particular here, plenty of people could help themselves by creating better posts.

hericles 289 Master Poster Featured Poster

<script> tags need a closing </script> tag. /> is not enough.

hericles 289 Master Poster Featured Poster

Could it be as simple as including z-index in the CSS of the menu to make it display on top? I'm not familiar with this particular library so I'm guessing here:)

hericles 289 Master Poster Featured Poster

Well you could have this for the last part of the SQL:
WHERE (@listItem LIKE '%' + @CUST_NAME + '%')"

and use parameters for the @listItem as you have for @CUST_NAME.

As for the error, your SQL string will have a mistake in it. Looking at what I typed it maybe the quotes marks around the % are the problem. Try
WHERE " + dropDownList.selectedItem.ToString() + " LIKE %' + @CUST_NAME + '%"

hericles 289 Master Poster Featured Poster

The database file can be placed anywhere (the data folder of the SQL Server install is the default) but you need a copy of SQL server on the computer to be able to use the file. As I said before, without an actual SQL server available the SQL file is useless. Its the same as trying to open a .xls file without a spreadsheet application - it doesn't work.

hericles 289 Master Poster Featured Poster

If you don't secure the end points of the transmission (via SSL or something similar) then a man in the middle can always find a way to access the packets.
Steganography is just encryption with another name. If you don't want people to be able to see the packets use SSL. If you are confident in your encryption algorithm, don't.

hericles 289 Master Poster Featured Poster

In text the power sign is normally given by the ^ character (above your 6 on the keyboard. E.g. 10^2 = 100.
Using a word processor the 2 would generally be turned into superscript which places it above the other characters and smaller.
In HTML you can use the <sup></sup> tag or use a CSS class.

Is that what you are after?

hericles 289 Master Poster Featured Poster

Not without seeing some code...