|
sorry about the cross post, and i did not tell her that i knew it or hinted at it. I will have a talk i guess
|
|
|
|
|
United States law says that (as long as you did not claim at some point you did know) if you do not know how to do something that is part of your job, the company is required to give you the necessary time and resources (book, class, etc) for you to learn the process in a reasonable amount of time on the company dollar.
______________________
stuff + cats = awesome
|
|
|
|
|
hi all
sir i have made a database and a table and add data in tables in mysql
but then i reinstall another version of mysql .
now i cut the data folder from older version and paste it
into newer version
now when i use show databases in newer version of mysql
it will show that database and tables also
but when i try to show values in tables it will give an error that this table
does not exists
please sir
thanks
hi
|
|
|
|
|
You've already posted this question - just below in fact. Please don't repost.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: You've already posted this question - just below in fact. Please don't repost
Actually, the post below was orginally asking if it was okay to post a question on MySQL in this forum. When I replied that it was okay he then changed the content of the post to the question he wanted to ask.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Hmmmm. Oh well - still breaching the "rules" though.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
paras_s12 wrote: can i ask a query related to mysql please in this section
Yes
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
I should add that unless your question relates to the way MySQL interacts with .NET applications you may find the responses limited. If it is a purely MySQL question then a forum that deals with that would more likely be useful to you. People will still be able to help you, there are just less of them specialised in that technology here.
Welcome anyway.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Assume that I have a table with UserName and Password columns. Both are varchar type. I given primary key for UserName. But we got another requirement that Password also should not repeat. So I tried setting primary key for Password also. But my first attempt resulted in failure. SQL said you can't create multiple primary keys on a table. Is there a concept called composite key ? Is it related to my requirement ? Or is there any other way to make both fields to be acted like primary key (Both fields should not repeat).?
|
|
|
|
|
You can mark a column as UNIQUE which ensures its value doesn't repeat. However, I don't believe that fits your requirements.
What if two independent users happen, by chance, to pick the same password? What if one of them is mallicious? The fact the second user cannot choose their password means they know someone else already has that password. Now their brute force attack on the system is faster because they have a known password and just have to match it to an existing user.
Most systems don't allow a user to duplicate a password they've used in the past. I would guess that it your requirement. In which case you need to store a history of passwords for each user.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Colin Angus Mackay wrote: What if two independent users happen, by chance, to pick the same password?
Thanks, But this is not the real scenario. I just given a simple example about my requirement. I am using this in another table. Not using for users. Any other way to ensure both of the fields won't repeat ?
|
|
|
|
|
What he told you to do, solves the problem. He was just telling you why not to do it with passwords.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Navaneeth. wrote: Thanks, But this is not the real scenario
Why not tell us the real scenario? It would have mean I didn't have to write all those warnings about security which are, only now, obviously not needed.
Sometimes I really wonder whether I'm wasting my time helping here or not.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Real scenario is, I store ItemCode and ItemName in one table. ItemCode is primary key. I don't want to repeat ItemName also. For that I tried this. Actually I just given a example about username and password to understand the problem easily. But I think I am mistaken and my first example made lot of confusion. Sorry.
Colin Angus Mackay wrote: Sometimes I really wonder whether I'm wasting my time helping here or not.
Never. Your postings are excellent. You are doing good job. Thanks
|
|
|
|
|
Colin Angus Mackay wrote: Sometimes I really wonder whether I'm wasting my time helping here or not.
Not only the poster whom you are replying gets benefited.
It helps everyone who sees you reply.
Colin Angus Mackay wrote: I didn't have to write all those warnings about security
These warning may help others.;)
So you are not wasting you time.
Regards,
Arun Kumar.A
|
|
|
|
|
Instead of creating a single primary key per field, you can select all of the fields that you want and create it as a primary key in one go.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks, I tried that SQL Server created all the selected fields as primary. But still it is checking only the last field. Remaining all fields in the primary list are allowing repeats. Any other alternative for this ?
|
|
|
|
|
The primary key as a whole will be unique. Individual elements within the primary key may not be unique.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
If the fields must be unique, then you need to implement a unique index on each field that you want to be unique, e.g.
CREATE UNIQUE
INDEX [] ON [dbo].[Workspace] ([Description])
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I work on a project which transfer an access database in mysql.
My problem is that I have a function which convert a binary information in mysql and that function doesn't work so good. This function looks like this:
While i <= Len(str)<br />
<br />
Select Case Mid$(str, i, 1)<br />
<br />
Case Chr(0) ' ASCII NUL<br />
'nlstr = ""<br />
rstr = "\0"<br />
<br />
Case Chr(8) ' backspace<br />
'nlstr = ""<br />
rstr = "\b"<br />
<br />
Case Chr(9) ' tab<br />
'nlstr = ""<br />
rstr = "\t"<br />
<br />
Case Chr(180)<br />
'nlstr = ""<br />
rstr = " '' "<br />
<br />
Case "'"<br />
'nlstr = ""<br />
rstr = "\'"<br />
<br />
Case """"<br />
'nlstr = ""<br />
rstr = "\"""<br />
<br />
Case "\"<br />
'nlstr = ""<br />
rstr = "\\"<br />
<br />
Case Chr(10) ' line feed<br />
'nlstr = ""<br />
rstr = "\n"<br />
<br />
Case Chr(13) ' carriage return<br />
'nlstr = ""<br />
rstr = "\r"<br />
<br />
End Select<br />
<br />
If rstr <> "" Then<br />
str = Left$(str, i - 1) & rstr & Right$(str, Len(str) - i)<br />
i = i + Len(rstr)<br />
rstr = ""<br />
Else<br />
i = i + 1<br />
End If<br />
<br />
End While<br />
<br />
where str is the information.
If you have an idea please help me.
Thanks.
|
|
|
|
|
Why don't you read this[^] for a better post ?
|
|
|
|
|
Hi,
sorry if i crosspost,but i hadn't noticed this forum section,which is more suited to my question.I'm writing an app with MS VC++ 6,using ADO (the oldest one,not ADO.NET) to connect to an Access database.Now iu would like to use a MySQL database instead.Is it possible?What should i change in my code?
I'm kinda confused,because i have found,in MySQL site,the C API for My SQL,but using that would force me to write lots of new code,instead i was thinking that,with ADO,a single change to the connection string would be enough:is that true?
|
|
|
|
|
|
Thank you,i think it will help me
But i have a question,due to my ignorance about databases
Reading the article i noticed that for a DSN-less connection there are many alternatives,depending on (i think) the database i would use.For a DSN connection,instead,i have the only ODBC DSN.
So my (newbie) questions are:is DSN a way to standardize connections to a database?Is it related to ODBC or are they two indipendent concepts?
|
|
|
|