|
there is a company with workers and the boss wants to be able to query stuff about the workers using my application; like "show the workers with name xxxx who started working on yy.yy.yyyy". when new workers arrive and some quit, the database should be handled accordingly.
this is a random application that rushed to my mind, all i want to do is to get involved with databases. first of all, i am pretty sure i can handle this application without a specific database, why should i use for instance mysql? why should i use a database anyway? i can just create my structs and have my own data arranged in the way i like...
i am working on windows platform,
now, i assume i will use a database for this, lets say mysql. i will create my database using a language like perl, from the txt files. then lets say i will maintain the application with c++. probably there will be libraries of mysql available?? i will use their functions etc. all of this will take place on my own pc, now after everything is finished, how should i pack my application? i want it to be as simple as an executable file which you download and just run to install the application. at this point, what should i include in the final package? its pretty obvious that i need the libraries, but besides i also need mysql to be running on the client am i right? but if the database wont be changed in the client side then does the client really need to have mysql? lets say the database should be updated at times. one solution, i guess, is to maintain the database on my own then let the client copy and paste this new database to his installation directory everytime there is an update.
unfortunately i dont have any books on databases and stuff. when i did some google all i encounter is sql directives and those specific stuff... not an overall introduction. and almost every place where i seek answers, i see php .net asp c# etc... i dont know any of those languages, do i really need them with my pretty straight forward application? all in all i am confused and i hope to hear any suggestions/info
|
|
|
|
|
I suppose if you wanted to store this information in text files instead of a database you COULD...it is just easier to use a database, especially if you have large amounts of data and several tables.... I think nowadays it will be a lot harder to find help if you go with textfile way.
About the type of database...I recently wrote a VB.Net windows PC project using an SQL Express database. It required a very hefty bootstrap that users needed to install. So midway through we switched to use an Access database. Access runs on the Jet platform, which is standard in windows. We just had to make sure that they had Microsoft Data Access Controls (MDAC) installed and that was a considerably smaller install. Access has less capabilities than SQL Express, but the project was small so it didn't effect anything.
About distribution...if I understand your situation correctly you want one central location to store the data but to distribute reports or queries on the data to many people. It kind of sounds like your perfect solution would be to make a website that displays the data. That way users would be able to access the most current information at any time and you only have to update the data in one place...no worries about people viewing out of date information.
Assuming that you haven't done any programming, you may be interested in trying the free version of Visual Studio 2005 for people who program as a hobby.
If all of this is too much and you don't want to write a website/program, it almost sounds like you could do all of this in an Access Database or if you don't mind it being a little crude...in an Excel spreadsheet. Excel has the ability to add VB code by record macros. Here is a site I found that goes in depth on the subject:
http://www.office-addins.com/-excel-addins/microsoft-excel-visual-basic-macros-made-easy-1.html[^]
Not sure exactly what you were looking for, but hopefully this will give you some more ideas to explore. Good luck.
|
|
|
|
|
thanks for the reply,
in the distribution part i dont want to get involved with those web pages and dynamic updates. so the database will be located on each client separately. the application should work offline. i am trying to keep everything simple so that i can take my time to deal with the database itself. when there is an update in the data, i am not sure as i said how to maintain the update. should i maintain the database on my own and then distribute it to the clients as a simple update file to replace the old database, or should the client be able to maintain the database on his side with a small script i provide? in the latter case i am sure he will need mysql or whatever database i use, but i am not sure with the former option. and also i dont know anything about the convention of this update stuff.
i have done programming with java, c, c++, perl. i am not yet sure which one to use for the development of the main application. as i said any help is welcome.
and one last question, in my scenario is the client also a server? because it has everything it needs to run the application, it can work totally offline(ignoring the update, which can also take place offline provided that the update file is possessed)
|
|
|
|
|
Is there a way to change a column's size in a table without dropping the column and then adding it again with the new size defined?
|
|
|
|
|
ALTER TABLE mytable ALTER COLUMN mycolumn VARCHAR(25)
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
And here I thought it would be complicated.
Thanks for your help!
|
|
|
|
|
Hi,
I am asked to convert stored procedures to functions .Can anyone tell me the advantages of functions over stored procedures and vice versa and i am not shoor if i can use system ftions like getdate() in functions
pls help me out
thnks in advance.
|
|
|
|
|
Functions are useful when you only need to return a single value from a procedure, rather than a set of data.
You can use all built in functions as you would in a SP, the only limitation AFAIK is that you cannot insert/update from a function.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
|
Live and learn, of the countless times ive used UDF's ive never come across this!
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
|
sishya wrote: Can anyone tell me the advantages of functions over stored procedures and vice versa and i am not shoor if i can use system ftions like getdate() in functions
pls help me out
You cannot use functions such as GETDATE() because they are non-deterministic. A function must have a deterministic operation. i.e. Given the same inputs it will always produce the same output.
I wouldn't go around and convert stored procedures to functions just because.
I wouldn't say functions or stored procedures have any avantages over each other. They are designed for different uses.
A function can return data to calling code more easily that a stored procedure can. A stored procedure can perform data modification actions (INSERT/UPDATE/DELETE) that a function can't.
Scottish Developers events:
* .NET debugging, tracing and instrumentation by Duncan Edwards Jones and Code Coverage in .NET by Craig Murphy
* Developer Day Scotland: are you interested in speaking or attending?
My: Website | Blog
|
|
|
|
|
I'm writing a small C# windows application that will create a new database and populate it with tables, views and stored procedures. Of course I am using SQL scripts that I'm launching from the windows application. I ask the user to enter 2 fields, the server name and the instance name of the SQL server.
My question is: is there a way to check if the entered server name and instance exist?
Since I launch the scripts by starting a process to run osql, I don't know if I get some return value to tell me that the server was not found. So basically even if the server name is wrong, the application says that the operation is completed, although nothing has been done.
Thanks,
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
|
Thanks, I'll try that out
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Hi All,
I have setup of my vb application running on a computer with backend sqlserver2000 on same computer. I want that I can run my application on many computers which are networked with the same central database. Can any one please suggest me what parameters should I have to keep in my mind or simply how can I achieve this?
I will be very thankful.
Varun Arora,
Software Engineer,
Knowledge Calls,
Gurgaon, India
|
|
|
|
|
|
It might be a silly question
I want to retrieve the data when some action is performed
Actually,when the page is loaded default data loads in to the data grid
when the combo box Item is selected then I want to retreive the data related to that particular condition
Do i need to create one more data adapter and data set
If not How can i do that
can any one of u guys tell me
Thanks
|
|
|
|
|
Store all the information in one dataset. When the combo box is created you can select out of this existing dataset based in conditions given - maybe selecting only one type of products codes based on selected value.
|
|
|
|
|
Hi,
I have a table like this:
Param Cat Pay
---- ---- ---------
bugj home rent
bugj home repair
budj home something1
budj car something2
budj car somethg3
budj tax somethg4
My progam has to search the field cat and list all the categories. i.e home,car,tax
Plese can you tell me if there is any particular sql which eliminates repititions?
Thanks
Fortitudine Vinsinues!
|
|
|
|
|
SELECT DISTINCT Cat FROM TableName
----------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Thank you.
Fortitudine Vinsinues!
|
|
|
|
|
Hello All,
I have a table that has 4 coloums of which one is primary key and is set to auto increment.
Is it possible to write a stored procedure that inserts value in the rest of the three coloumns and returns the value of the primary key that was generated automatically.
|
|
|
|
|
I'm not a database expert, but nobody else answered your question so I'll give it a shot. It sounds like you're using Oracle or something because you said auto increment instead of index. But, in SQL Server, you can write an insert statement in your stored procedure like this:
insert into [table]
(
column1,
column2,
column3
)
values
(
@column1,
@column2,
@column3,
)
return SCOPE_IDENTITY()
That will return the value in the identity column.
In Oracle, you do it two ways. The first way is to have a sequence and get the next value of the sequence first using:
SELECT table_seq.NEXTVAL AS ID from DUAL
Then when you do your insert, use that ID in your insert.
The other way is to have a sequence and a trigger. Do your insert and then select the max value for that column out of the table and return it. The first way is probably better.
Any of you db gurus out there, please correct me if I'm wrong.
Logifusion[^]
|
|
|
|
|
Thanks Dustin, that was fast. I am actually using SQL Server 2000 and I am sorry I forgot to mention.
|
|
|
|