Netcode 33 Veteran Poster

What DBMS?

Netcode 33 Veteran Poster

Well i was thinking of learning C as this is very widely used in industry,

That means you knew widely used programs but still decided to ask what is widely used.

one thing is, there is no best. Best can manageably be defined as as function of the application you want to design

Netcode 33 Veteran Poster

since the ID field is auto-increment, you cant add an ID to the query so remove the ID in the query and just leave the rest. The database would automatically assign an ID to any new entries.

Netcode 33 Veteran Poster

It entails continous research in the area. Keep reading as much as you can

Netcode 33 Veteran Poster

better still, it appears you want to keep log of every user that logs into your application. If am right, i would advise you create a login form so that users can enter their username and password. that way, you can now save the user information on every successful login

Netcode 33 Veteran Poster

From the values you're putting into the table, what does '1' stand for? are you using an auto-increment ID in the database or you insert at will?

Netcode 33 Veteran Poster

dbprovider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
dbsource = "Data Source = C:\Documents and Settings\aditya\My Documents\project.mdb"

your connectionstring should look like this:

Dim dbsource as string = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Emp.mdb;")
        
dbsource.Open()

'other codes to follow
sql = "INSERT INTO user values('1','aditya','goel')"
da = New OleDb.OleDbDataAdapter(sql, con)
run = New OleDb.OleDbCommand(sql, con)
run.ExecuteNonQuery()
Netcode 33 Veteran Poster

I totally agree, it has always been my thought

Netcode 33 Veteran Poster

first of all, the percentage sign should have gone with the 'Like' wildcard. from your id's, you wont even get an answer if you had no errors because the comparison operator would search for exactly whats on the right side of the query but using the 'LIKE' keyword would produce A better result

Netcode 33 Veteran Poster

Do you get any error message?

Netcode 33 Veteran Poster

Where are you getting your data from? because it seems you have a connectionstring and yet you want to get data from a label

cmdPro = New SqlCommand("select distinct Page from " & Lbl_model.Text & " order by Page", con)

I don't understand the above part of your code

Netcode 33 Veteran Poster

since you want to get the data by a particular date, then time-stamp answers your question and you can achieve that with Adam_K has just provided except you want something more detailed and then you would have to provide more details too for better understanding

Netcode 33 Veteran Poster

If they were not necessary, you wont hear of them. Am sure you're reading and that's why you knew of them, just keep reading

Netcode 33 Veteran Poster

check here

Netcode 33 Veteran Poster

SQL (often referred to as Structured Query Language) is a programming language designed for managing data in relational database management systems (RDBMS).
while
Oracle(commonly referred to as Oracle RDBMS or simply as Oracle) is an object-relational database management system (ORDBMS)

debasisdas commented: agree +13
Netcode 33 Veteran Poster

keep posting and keep knowing them as you move

Netcode 33 Veteran Poster

Make use of the 'LIKE' wildcard

Netcode 33 Veteran Poster

funny......all those things went in to your stomach?

Netcode 33 Veteran Poster

nice one.

Netcode 33 Veteran Poster

check here

ErnestSeeker commented: good +0
Netcode 33 Veteran Poster

> The disk may not be recognized by the system at start up
> The Boot Loader may be corrupt
>I would recommend you reinstall the OS

Netcode 33 Veteran Poster

If it works, then mark thread as solved

Netcode 33 Veteran Poster

the datatype on your dbase does not match that of the datetimepicker

Netcode 33 Veteran Poster

i am asking about functions not about auto_generate_id()
it may be blank or other function.

You have not explicitly stated what you want. From your codes, you're retrieving the staff_id in the database and incrementing to make another id. That's good and most vb6.0 developers do that but what if there is no current record. That's why you need to create a random class that would generate ID's independently.

So from this, do you want to learn how to create a function or you want to learn how to generate auto_id that works?

Netcode 33 Veteran Poster

You can simply use the Import and Export wizard in SQL server Management studio

Netcode 33 Veteran Poster

What exactly is the problem with your codes and
How do you want to access the auto generated numbers?

Netcode 33 Veteran Poster

Good one but read up on JOIN as you said, it would save you some time.

Netcode 33 Veteran Poster

Had same issues yesterday and the day before. Am not sure its peculiar to browsers though i use firefox and also on windows 7

Netcode 33 Veteran Poster

I don't think it is that big stuff!

What exactly, the family, the tribe, or the people that make the tribe?

Netcode 33 Veteran Poster

See if this works:

SELECT T1.date, T3.Result 
FROM T1 
INNER JOIN T3 ON  
T1.ID = T3.ID
WHERE Location = (SELECT Location FROM T2
			WHERE Location ID = 'condition')
Netcode 33 Veteran Poster

You can use JOIN keyword to link two or more tables and retrieve data from those tables based on similar columns that exist in those tables or you could make good use of subqueries

Netcode 33 Veteran Poster

I got mine at age 16 - 47 years ago. Had it taken away 3 times before I turned 18 and have had no moving violations on my record since - I got caught speeding, running red lights etc but always got off with some fast talk.

wow! that's much experience. :cool:

Netcode 33 Veteran Poster

Nice one Adam_K. Please mark thread as solved if solution found

Netcode 33 Veteran Poster

What a strange thread!

Did you say strange? I would rather call it a family tree.

Netcode 33 Veteran Poster

The code u gave is 'DataGridView1' but i'm using 'DataGrid1'. I thought they are different things and somehow it cause errors and it still does not generate the autonumber. One of the errors is; Error 1 Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
How should i fix this? thanks.

Ignore DatagridView1 or Datagrid1. Thats just the name of the control so to make it right, put the correct name given to your datagrid control there.

Netcode 33 Veteran Poster

I think it needs to be marked as solved since you've got what you want. Why did you mark it as unsolved again?

I so much agree this has to be marked solve and please don't walk away like the others now that you've got your answer. Hey! am not judging, just saying;)

Netcode 33 Veteran Poster

At 17 but had to have about 40 lessons! And failed the first time, passed the second time round.

And I have a motorbike...

Next on the list helicopter -> Speedboat -> Airplane -> Tank.

You have plans. I really want to experience what it looks like with a heavy duty vehicle (MAN Truck)before i make plans on being in the air.
I love the sight of being on the road with other cars but you would be so elevated and you can not help but look down on the roof of others

Netcode 33 Veteran Poster

So, reasons for not putting all data in a single db:
1) Different backup strategies. Production dbs with data that change every second has totally different backup strategies than dbs with reporting data only. Size of dbs and of transaction logs are critical factors
2) Ownership. If each application has it's owner (or belongs to a different department) for security reasons it's best to keep the dbs separated and restrict the db owners to their db. Also merging all dbs in 1 db under this scheme means that somebody has to assume the role of db administrator / owner.
3) Compatibility. If the apps you are using require a different compatibility level then the separate dbs is a must.
4) Lack of resources. To change a lot apps means a lot of testing (depending on the importance of those apps, but still) and probably some troubleshooting. Does your company have the resources for this?
5) Data availability. When you restore a db for example, do you want everybody to surf the net, or just a portion of the company?

Well written

Netcode 33 Veteran Poster

mark as solved

Netcode 33 Veteran Poster
Netcode 33 Veteran Poster

Please mark this thread as solved

Netcode 33 Veteran Poster

I was asked a question a few days ago that I cannot easily answer.

"Why don't we put all of our small application databases into a single database?"

Well, There's nothing really stopping us. All of our small apps were developed in house so we don't have any problems with conflicting table names etc.

My initial reaction was to recoil in horror, "No way!" I don't think that I shouted, but it wasn't far off.

But the questioner stuck to his guns, "Why not, can you come up with a REASON why we shouldn't do this?"

Well, how about high availability? Well we can set up a cluster, or mirrored pair of servers, so that's no limitation.

And, no, I couldn't.

So I'm throwing this open - How many Applications should be using a single database?

Over to you.
:)

Well, i really cant say yes or no, it depends on the user and environment. Putting all in one database is possible if they are related like a Human Resource and a Payroll but also remember like you've been told before that you have all in one basket and a good backup and recovery mechanism is paramount.

Think if it is really necessary and make best conclusions

Netcode 33 Veteran Poster

i started driving at 16 but i got my first licence when i was 21

Netcode 33 Veteran Poster

why would you want to execute commands from a text-box when you can simply declare variables to hold the commands.

adam_k commented: And how do you execute all VB.Net commands from variables? -1
Netcode 33 Veteran Poster

it has been wet for the past three days but we have a very bright morning to enjoy on a work day.

Netcode 33 Veteran Poster

Nigeria.....cool but boring

Netcode 33 Veteran Poster

the best and easiest way is to write a single event handler for all textboxes on the form

Netcode 33 Veteran Poster

ahuh and that's another thing I should think about, sir maybe for now let's assume that the process is executed properly when that certain window is closed..

You keep accepting all options, it appears you've not stated clearly what you want to do. That's the first thing to do

Netcode 33 Veteran Poster

For VB6.0, i would advice you create your projects and the database file in the C:\ drive. You can create a folder there to save projects so when you move your project folder to another system, the name and directory of the Access Dbase file remains the same.
Having said that, here is the code for MS Access connection:

Option Explicit
Public conn As New ADODB.connection
Public rs As New ADODB.Recordset

Sub connection()
Set conn = New ADODB.connection
conn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source=" & App.Path & "\data\DataBaseName.mdb"
End Sub
Netcode 33 Veteran Poster

I do believe there are things worth dying for, but the dude is obviously in the wrong. You don't just kill people to promote a book! Unless the book is going to save the world, but somehow I doubt that if we don't read it the world will split in half and shoot demons from it's core (hey that might be a cool book).

Shooter = Crazy.

to me, the guy is a frustrated soul. Maybe he felt he has done something so good and worth recognition but the world was not just giving him the attention he deserved. Well, lets not be biased judges, maybe we should all read the book