SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 hi! newbie here..making our school thesis :)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cherrydee
Starting Member

Philippines
1 Posts

Posted - 05/14/2011 :  10:28:29  Show Profile  Reply with Quote
hi guys. i am an IT student here in the philippines and we are tasked to make a centralized police system which can record potential criminals through thumbmark scanning and can alert the police if that person has existing record. the database can be viewed in all precincts.

the system is about 80% complete. i got a few functions left..
1.)how can i make the textbox display the last idno of my sql table? like if the last record is 009. i want the textbox to display 010.

2.) i have declared date of incident in sql as date. and its format is yyyy-mm-dd. but when i try to view the record in VB, it's format in txtbox is mm-dd-yyy. so when i want to update a field, i have to update the date too. or i will get an error

3.) how to make data report? >.< sorry i only know how to make report in access type not sql. since i want to view the cases under a certain person, if i have 5 tables of cases, wouldn't it be too long?

sunitabeck
Flowing Fount of Yak Knowledge

5152 Posts

Posted - 05/15/2011 :  06:36:47  Show Profile  Reply with Quote
1. You can use the max function in SQL as in max(record_number) to get the current maximum value in the sql table. However, doing it this way may not be the most efficient or desired way of doing it. Hard to tell without knowing a lot more details about your tables, data etc.

2. Storing data as data type date is the right thing to do. In VB, text box allows you to specify the format to change the way it is displayed. When you want to save the data back to the database table, depending on how you are interacting with the database, you can reformat it and send it to the database. In general, it is safe to use the format YYYYMMDD for dates, because that format will always be accepted and interpreted correctly by SQL database.

3. SQL database itself does not have any way of generating a report in the normal sense of the word. You can join the 5 tables in a select query and get the data, but to present it as a report, you will need to use something outside of SQL server. SQL Reporting services is a good choice - I think it may even be free depending on the product SKU of your SQL.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000