No, if the recipient doesn't have SQL Server Management Studio, he/she will need a program to open the file. Either ssms.exe or sqlwb.exe.

StephNicolaou 32 Posting Whiz in Training

All,

Is it at all possible to have a 'multiple items' form based on a query, plus have a combo box added to it, with the control source of a field already on the form.

Issues:

  1. When the combo box is given the control source of a field already on the multiple item form, the combo box can no longer be updated.

  2. When the combo box is not given the control source, it can be updated but then it does not load the initial value of the control source field.

Major issue:

  1. When the combo box is updated for a record on the multiple item form, it then updates all of the other combo boxes for each record.

I've been working with Access for quite a long time and always put it down to Access not being powerful enough, whereas I could do this in Java in a few minutes.

Hope someone has an answer to this odd one.

Steph

Yes, this is possible.

To select a range of rows, you use the LIMIT element.

E.G. SELECT * FROM tbl LIMIT 5,10; # Retrieve rows 6-15

"With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the MAXIMUM number of rows to return. The offset of the initial row is 0 (not 1)" - MySQL

[URL="http://dev.mysql.com/doc/refman/5.5/en/select.html"]http://dev.mysql.com/doc/refman/5.5/en/select.html[/URL]

To insert these rows into another table you use the INTO element.

E.G. INTO TABLE (COLUMN)

-[URL="http://stackoverflow.com/questions/6194037/mysql-insert-without-having-to-specify-every-non-default-field-1067-invalid"]http://stackoverflow.com/questions/6194037/mysql-insert-without-having-to-specify-every-non-default-field-1067-invalid[/URL]

Altogether you should have something like this:

[code]
SELECT lab_name INTO TBL(AM) FROM tbl LIMIT 0,5; //Gets first 5
SELECT lab_name INTO TBL(PM) FROM tbl LIMIT 5,5; //Gets from record 6 to next 5
[/code]

Hope that helps :)

Alternative methods & resources:

[URL="http://www.ntchosting.com/mysql/insert-data-into-table.html"]http://www.ntchosting.com/mysql/insert-data-into-table.html[/URL]
[URL="http://dev.mysql.com/doc/refman/5.0/en/select-into.html"]http://dev.mysql.com/doc/refman/5.0/en/select-into.html[/URL]

Yes, you do not have to include the username or password.

I'm not sure if you are familiar with the database connection syntax, but you can just exclude the username and password variables from the connection string.

E.g. [URL="http://www.java-samples.com/showtutorial.php?tutorialid=9"]http://www.java-samples.com/showtutorial.php?tutorialid=9[/URL]

There are alternative methods such as the grant element to allow public access but I would advise you use the standard method of connecting to a mysql database, there are numerous online tutorials where you can just exclude the usrname & pw. I haven't personally tried this as I wouldn't advise you not to use a usrname & pw in the first place.

However, even if you do include the root username and password for the mysql database in your program, the users do not see this anyway. So either way, you can successfully set up a connection to the database from all computers.

Hope that helps :)

Student_ID is not a string, could you change line 9 to:

[code]pst.setInt(1, txtid.getInt());[/code]

Yes, you can usually execute to different prepared statements.

Hope that helps :)

No problem. Could you please mark this thread as solved if done so?

Thanks :)

Are you able to move line 47 where you are doing this to line 16 and just make the frame visible when the button is hit instead?

Could you also inform us of the error message you're receiving?

Thanks :)

Try this with variables defined and without the getbytes method for now:

[code]

try {
InetAddress adr = InetAddress.getByName("173.194.35.133");
System.out.println("Reachable Host: "+adr.isReachable(3000));
boolean status = inet.isReachable(3000);
System.out.println("Reachable Host:" + status);
}
catch (IOException e) {
e.printStackTrace();
}

[/code]

Either using the boolean or not.
Hope that helps :)

Unfortunately, GoDaddy doesn't allow you to increase your database size limit.

However you can have more than one database, if you upgrade you account plan.

If you have the Economy plan, you can have 10 databases, Deluxe gives you 25 database and you can also have an Unlimited plan.

The PHP sqcript to get your database size is as follows:

[code]

<?php
$db = mysql_connect("hostname", "username","password"); // MySql database connection
mysql_select_db("dbname",$db); //Select the database
?>

<?php
{
$sql = "SHOW TABLE STATUS"; //Command to get the database status
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
$dbsize = $row['Data_length']+$row['Index_length']; // Columns 'Index_length' and 'Data_length' of each row calculated
}
echo($dbsize); // Print the database size
}
?>

[/code]

Once you have the size (with $dbsize) you can check that thedbsize < 1GB and if true, run the following PHP script to create a table and it's tables:

[code]

<?php
$con = mysql_connect("hostname", "username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

// Create database
if (mysql_query("CREATE DATABASE my_db",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}

// Create table
mysql_select_db("my_db", $con);
$sql = "CREATE TABLE Employees
(
FirstName varchar(15),
LastName varchar(15),
Age int
)";

// Execute query
mysql_query($sql,$con);

mysql_close($con);
?>
[/code]

Hope that helps :)

Modify the double percentage symbols to a single percentage symbol, e.g. '%M %e, %Y'

Double percentages are a literal % symbol.

Here is a MySQL guide to every format available:

[URL="http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format"]http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format[/URL]

Hope that helps :)

Okay great! You got the UPDATE statement to work without the apostrophies, that's what I would have tried next. Update statements work differently depending on the type of SQL so can never be sure, I used Access for my example.

For updating two tables I would suggest you to play with the following pseudo:

[code]
UPDATE PLAYLIST AS a, table_2 AS b
SET PLAYCOUNT = PLAYCOUNT + 1 / a.PLAYCOUNT = b.PLAYCOUNT
WHERE a.ID = b.ID
[/code]

Can you please put line 15, pst.executeUpdate(); on line 29, after your setString's?
Try that and let us know the exact error message.

Your insert SQL statement is always expecting there to be 8 images and so the undefined variables are the empty files being found. Your SQL needs to be more dynamic, counting the number of files you have prior to the SQL statement.

Here is a working example of a dynamic SQL statement which does what you require:
[url]
http://www.dynamicdrive.com/forums/showthread.php?t=34294
[/url]

Hope that helps

I am assuming you have an EMPLOYEE & CART entity with each of their primary key and attributes, in addition to a link table, e.g. EMPLOYEE_CART with the foreign keys, Employee_ID, Cart_ID and the Sum.

So to store each instance, use the INSERT INTO statement. E.g. INSERT INTO EMPLOYEE_CART VALUES (Employee_ID, Cart_ID, Sum(Amount)).

You can then pull all the information you want to show, like the names and cart information in a SELECT statement via. the relationsional links indicated above.

Hope that helps.

Try changing the equals to VALUES()

E.G.
[code]
UPDATE TABLE2 SET VIDEOID,VIDEONAME,DIRECTOR,RATING,PLAYCOUNT VALUES ( 'VIDEOID','VIDEONAME','DIRECTOR','RATING','PLAYCOUNT') FROM TABLE1
[/code]

Another UPDATE that is possible:

E.G.2
[CODE]
INSERT INTO TBL1 ( A, B, C )
SELECT tbl.[A], tbl.[B], tbl.[C]
FROM aTBL AS tbl
[/CODE]

Research the company website, wikiJobs, the financial times news, company news & events in general. Get on linkedIn, follow their company, view their updates and get connected to the contacts that visit your school/uni. Make sure you take your CV (with all relevant experience) and/or business cards - which you can get printed from VistaPrint of similar.

Read everything up on them as you can, their recruitment process and previous experiences may also be online in addition to knowing your stuff in regard to the job you want.

Use the INTO statement after your SQL SELECT statement (..as UniqueClick..) before the FROM elememt.

So .. INTO tableName

tableName will then be created on the fly if not already created, else updated.

[url]http://www.w3schools.com/sql/sql_select_into.asp[/url]

Why don't you assign name into a global variable $a before you close the connection on line 13 (part one) i.e. place this line [code]$a=$row['name'];[/code] after line 12. Alternatively use the same statement on the other page.

Line 27 isn't needed. Has this been solved already now that this is 2 days old?

Are the fields blank or do they have the value zero in them?

[code]
public static int getLineNumber() {
return Thread.currentThread().getStackTrace()[3].getLineNumber();
}
[/code]

"The index will change based on the JVM version. I believe it changed from 1.4 to 1.5". Resource: [URL="http://bit.ly/xLDhVJ"]http://bit.ly/xLDhVJ[/URL]

I have changed the index to [3] instead of [2] but try either based on the version you are using until the line number of where function was called from is correct.

Hope this helps :)

DavidKroukamp commented: cool :) +9

Without reading through your whole code, a simple way would to just use the scanner class, "Please enter your name and surname".

[code]
Scanner sc = new Scanner(System.in);
string name = sc.next();
string surname = sc.next();
sc.close();
[/code]

[URL="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Scanner.html"]http://docs.oracle.com/javase/1.5.0/docs/api/java/util/Scanner.html[/URL]

To move data from a table into another table called archive, you have to write a SQL query, e.g.

SELECT * FROM TBL into Archive

And it will create the table Archive on the fly if it's not already created.

'Delete foreign data' is my short way of saying foreign keys, E.G. Employee table has primary keys EmployeeID and a table called EmployeeTimetable will have the foreign key EmployeeID to indicate whos timetable is whos - If you delete the primary key data from the Employee table, EmployeeTimetable will have nothing to refer to...And give you errors as the employee ID will not mean anything to it.

You connect to a database via. the below: (w3schools)
[code]
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
?>
[/code]

Here are some tutorials on how to connect to a database using PHP:

[url]http://www.tizag.com/mysqlTutorial/mysqlconnection.php[/url]
[url]http://php.net/manual/en/mongo.tutorial.php[/url]
[url]http://www.w3schools.com/php/php_mysql_connect.asp[/url]

That should get you started :)

Well, it depends how complicated/realistic you want this program to be.
If you've wrote the database, you should have students, the courses they are assigned to, their lecturers and their timetables, etc!

Then you can add a database table linked to the courses tables for all the course's assignments/examinations and the dates they are due.

For the front-end interface I would imagine their being a side navigation for the list of courses that particular student is signed up to, (configured as they log into the system, like Blackboard) and there being a center calendar where the deadlines are also shown in there. In addition to a widget/highlighted corner section, that has the countdown for exam(s).

I would create a left navigation for the button to the calendar, latest alerts, course notes, exam locations, also shown on a map, etc.

Anything else you would work on from there, be creative!

To do the actual calculation, you can use the timer control or the DateDiff(date1, date2) method.

Hope that helps :)

Yes, connect to your database as you would normally, connection paths, etc.

And use the SQL statement, DELETE * FROM TBLNAME1, TABLENAME2 ...

How would that database look? The tables would just be empty and you would have to make sure you also delete foreign relational data to ensure you don't get errors in the front end.

Hope that helps :)

Hi there. You are receiving incompatible types because x is and int and z is a double.

Also, are you allowed to change from public parent to Shape myShape = new Shape[10] ?

You don't have to keep setting the frames visibility as true and false, you can use the frame.dispose() method and frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE) method. But either way works.

If you've added the menu item to the menu, remember to implement ActionListener for your class and use the addactionlistener method:

[code]
menuItem.addActionListener(this);
[/code]

Check out the links I gave you, it's all there :)

Select all the fields you want to use and place MAX() around the field you want. Then you have to group by everything youve selected and order by a field ID.

[code]
SELECT TBL.field1, MAX(TBL.field2)
FROM TBL
WHERE TBL.childid on TBL.childid and
(parent.name LIKE '%$search%') GROUP BY field1, field2ID ORDER BY field2ID
[/code]

Have to dash. Hope that helps :)

First you have to drag and drop the combo box into the form. Then, under the Form Load event in the Code Builder, you call the two options, I'm assuming from a database, using the RowSource method and SQL:

[code]
Me.ComboBox.RowSource = "SELECT * FROM [Duties] IN '" & DatabasePath & "' "
Me.Requery
[/code]

If you are not using a database, just write them in yourself:

[code]
Me.ComboBox.RowSource = "Duty1" & ";" & "Duty2"
or Me.ComboBox.RowSource = 1 & ";" & 2
[/code]

To get the selected value, just use the .Value method:

[code]
variable = Me![Combobox].Value
or variable = Me.Combobox
[/code]

You can replace Me![Combobox] to [OtherFormName]![Combobox].Value if you are getting it from another form.

Hope that helps :)

Create a button and the command button wizard will pop up. Go to the category, Form Operations and choose 'Open Form'. A list of your forms will appear/ and select the form you want it to go to when the button is clicked. Then you can write the text you want it to say on the button, like 'Back' and click, next and finish.

This won't close the current form so if you are familiar with VBA coding, go to the property bar, tab Event and click the 'On Click' button. This will take you to the code and if no code is currently under the button a Choose Builder menu will appear. Select 'Code Builder' and see below:

    'This will close the current form. Alternatively, Me.Visible = False
    DoCmd.Close

    'This will open the open you on click of the button
    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "The forms name"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Hope that helps :)