|
Hello. Is anybody knows that It is ok to use char data type for date and Time i SQL Server 2005? Can it be used in comparison as well as use Date and Time data type? Is it a good idea to do it?
|
|
|
|
|
You can use it, but it's not a good idea. You should always use the most appropriate type for the data you want to store.
|
|
|
|
|
|
|
Let me put this in stronger terms NO YOU SHOULD NEVER STORE DATES AS STRINGS
Storing date as varchar is going to cause you problems in the future. You will see many questions here where the root cause is a date/string conversion.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi
please am new linq to entities, my question does linq support oracle or mysql? If there is any other database it support please list it out.
thanks
|
|
|
|
|
Why don't you just Google for "Linq Oracle" or "Linq Mysql" to find out whether they are supported or not?
By the way, there is a Linq forum for questions about Linq
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Yes. Now do a bit of research in Google and find out what I've just answered yes to.
|
|
|
|
|
Hi all,
i am using sql server 2005.
let me explain the scenario.
i have report where i bring perticular employee totalcall and workeddays then in third field i wrote an expresion to evaluate avg call that is totalday/workeddays and all the three field i displayed in table now requirment is in footer i should get avg of avgcall calculated
please suggest some idea
thank you
regards
imran khan
|
|
|
|
|
Look into the compute keyword in BOL.
Compute avg(avg(calltime))
Caveat - this will give you 2 tables in your dataset when using dataset.fill
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i am not able to connect to a MySQL database.
i am using this connectionstring "Driver={MySQL};SERVER=myserver; DATABASE=newdatabase;USER=root;PASSWORD=nvish;option=3;"
is there anything special i need to get installed i.e. any connecter / driver or need to include any namespace ?
Ashish Sehajpal
|
|
|
|
|
<a href="http://www.codeproject.com/KB/database/MySQLCsharp.aspx">http://www.codeproject.com/KB/database/MySQLCsharp.aspx</a>[<a href="http://www.codeproject.com/KB/database/MySQLCsharp.aspx" target="_blank" title="New Window">^</a>]
got the answer..... !
Ashish Sehajpal
|
|
|
|
|
|
This is nt a sql problem as such, you need to refresh your data in your code - if you have a datareader close it and reopen it, or refresh your dataset etc.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
When I said refresh your datareader or dataset thats what you need to do
bapu2889 wrote: dsImage.Clear()
conImage = GetDBConnection()
daImage.Fill(dsImage.Images)
If you re execute this you are refreshng your dataset with the revised data and you will see your changes.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
hi friends
I tried to run the script db.sql using SQLCMD.I tried to execute it with the following command....SQLCMD -E -i C:\a\db.sql.
It is not working in my system.It is showing the error "Could not open connection to SQLSERVER [2]"..."login timeout expired"....But this command is working fine in other system.Would you help me to trouble shoot this problem
With regards
Denver
|
|
|
|
|
Looks like you haven't properly specified the SQL Server you are trying to connect to. Check the help for SQLCMD - SQCMD -Help will probably do it.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Oh thanxx Bob...let me check it
|
|
|
|
|
|
This is a problem solving forum, we try to help you solve your coding problems. This looks like a straight request for code . There are many samples and examples that do this already available.
Do you seriously think someone is just giong to write these classes for you? The only thing you are going to di is set yourself up to be flamed, deservedly so.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
As you say "There are many samples and examples that do this already available" Why don't you provide the link?
I am not expecting the code for all the methods. I am looking for any example for any of the method mentioned in my post.
If you have solution pass it otherwise don't pass rubbish comments.
|
|
|
|
|
I've tried discussing this with you, it's plain you're not interested in discussing your problem, but just asking for someone to give you the code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus,
Let me clarify you, we have Fair Idea on Ado.net but in our project client have old Ado based COM Components using MTS and MSMQ. He wants us to convert that functionality of recordset and properties and events using the ADO.net and Microsoft Enterprise library.
we got some suggestion by writing the wrapper classes we can get the functionality.
We managed to write and map Ado.net table object to Recordset in wrapper class and we can able to manage the functionality of MSMQ and MTS using the interop services, but we are clue less to write the other properties and methods without using the ADODB Object.
We are looking for any clue or suggestion from anybody worked on wrapper classes on writing the properties / methods of ADO-recordset using Ado.net.
|
|
|
|
|
1) getBookmark()
2) setBookmark(currentBM)
I doubt you can do these, because you have no connection in ADO.NET, it's called and closed when you get a recordset.
3) Delete ()
Again, there is no concept of a current record, it does not exist. However, if you have a primary key, you can run a delete command based on the record you're looking at.
4) close ()
Your dataset does not connect to an open connection, it's not ADO, it's ADO.NET
5) getStatus()
6) getDataSource()
7) DataMember()
8) Update(Fields,Values)
9) ActiveConnection()
I am trying to google to help you, but all I am finding is your posts over the web asking this...
At the core, there is no active connection, no current record to delete or update, no data source in memory. ADO.NET makes a call and returns a view of the data. Your best bet is to work out how to do the same things, such as to make an update or delete call. There will be no one to one mapping of methods,.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|