|
Christer Claesson wrote: Having one table with all avaliable exercices and variables and just having NULL when the field is supposed to be empty? Splitting them up to different tables might be difficult as I would like to add new exercices without having to remake the database if I happened to miss one combination.
Splitting the information into tables is probably the best way - one table detailing all the variables, one table containg the excercises and another table with the link between the two (one to many relationship).
Hope this helps
Chandra Ram
|
|
|
|
|
Samuel G wrote: trying to connect to mysql database on my hosting account godaddy
Do they allow you to connect remotely to the database?
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
No they don't,
but it is a test page that I have uploaded to my hosting server
Samuelg
-- modified at 2:22 Wednesday 22nd November, 2006
|
|
|
|
|
Samuel G wrote: it is a test page that I have uploaded to my hosting server
Might be an issue on their part. Have you tried contacting their support people?
|
|
|
|
|
I manage to get it right so godaddy does support mysql for asp.net
my connection string was wrong I'v used there IP Address not there server name
ooops my mistake!!
SamuelG
|
|
|
|
|
The OLE DB provider "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers\OLEDB\Microsoft.Jet.OL
EDB.4.0" has not been registered.
I've tried this also,
EXEC sp_addlinkedserver 'ExcelSource',
'Jet 4.0',
'Microsoft.Jet.OLEDB.4.0',
'C:\Documents and Settings\viswanatha_c\Desktop\Book1.xls',
NULL,
'Excel 5.0'
Error:
User does not have permission to perform this action.
srinivasintouch
|
|
|
|
|
srinivasintouch wrote: The OLE DB provider "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Providers\OLEDB\Microsoft.Jet.OL
EDB.4.0" has not been registered.
Have you fixed this problem?
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
Hello everyone,
In my C# program I load an XML file to a dataset. It has elements called "page". Three of its nodes are year, month and day.. I want to write a query that whenever a user gives two different dates, the query should select the "page"s which's date fall between the given dates.
How can I achieve this. I tried a lot but while I am a rookie I couldn't find a solution. Also google doesn't help.
Thanks for your helps and best regards.
.:: Something is Wrong ::.
|
|
|
|
|
SELECT * FROM MyTable WHERE DateColumn > @startDate AND DateColumn <@endDate
If that is not the answer you are looking for, then perhaps you could explain which part you are stuck on.
|
|
|
|
|
Well, the problem is thatI haven't got any DateColumn.. There are three columns named year, month and date..
Anyway, I have solved it. I wrote a query like this :
<br />
dateQuery = "((year > '" + date.Year.ToString() + "') AND (year < '" + date2.Year.ToString() + "')) "<br />
+ "OR ((year = '" + date.Year.ToString() + "') AND (month > '" + date.Month.ToString() + "')) " <br />
+ "OR ((year = '" + date.Year.ToString() + "') AND (month = '" + date.Month.ToString() + "') AND (day > '" + date.Day.ToString() + "')) "<br />
+ "OR ((year = '" + date2.Year.ToString() + "') AND (month < '" + date2.Month.ToString() + "')) " <br />
+ "OR ((year = '" + date2.Year.ToString() + "') AND (month = '" + date2.Month.ToString() + "') AND (day < '" + date2.Day.ToString() + "')) ";<br />
It seems a bit confusing, but it do the job
Thanks a lot for your helps..
.:: Something is Wrong ::.
|
|
|
|
|
I havent really gone thru your query. Why not just do something simpler, so that your query is more readable in the future or to someone who is seeing your code.
<br />
WHERE Convert(datetime,day + '/' + month + '/' + year,103) >= '"+ date.ToString() +"' AND <br />
Convert(datetime,day + '/' + month + '/' + year,103) < '"+ date2.ToString() +"' .......<br />
Just an example, you may have to rewrite the query to your need.
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
Experience is like a comb that life gives you when you are bald - Navjot Singh Sidhu
|
|
|
|
|
That is a better solution - but still potentially suscepatable to a SQL Injection Attack. Consider the use of parameters rather than injecting values into the string.
|
|
|
|
|
Colin Angus Mackay wrote: Consider the use of parameters
And of course, read your article on SQL Injection Attacks
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
when i m trying to connect my c# application with Sql Server then a message is coming as"SQLNCLI.1" provider is not registered on the local machine. Any solution
sincerly
shriya
|
|
|
|
|
Do you have native client (client tools) installed on your local machine?
|
|
|
|
|
Hello,
I am using a report that has 2 subreports and when I create a 3rd it does not display any data on the form where they should be in the other 2 subreports.
My code is below.
I if take 1 subreport off and leave the other 2 then the report will display the data. but if i add another one then it displays nothing in the other 2 subreports.
I have used typed dataset. I don't have any groups, and deleted the links in the database expert of the report.
<br />
report.Load(Application.StartupPath & "/rptJobSheet5.rpt")<br />
<br />
report.SetDataSource(DS_JobSheet2)<br />
report.Subreports.Item(0).SetDataSource(DS_JobSheet2.Tables("IncidentTask"))<br />
report.Subreports.Item(1).SetDataSource(DS_JobSheet2.Tables("Supportcontracts"))<br />
report.Subreports.Item(2).SetDataSource(DS_JobSheet2.Tables("Client"))<br />
<br />
Me.CrystalReportViewer1.ReportSource = report<br />
Another quick question:
item(0) what name would this be in the properties of the subreport. I create the subreport using the wizard and have called it Client. but if i do this item("client") it shows an error. Also I have tried changing the name to this in the subreport properites | name. Should I use the index of the name property.
Thanks in advance,
Steve
|
|
|
|
|
Hello,
Is there anyway to append some value to colunm name? For example, i have table with 150 colunms and i want to do Select * and append today's date with each colunm name. So column1, column2... should display colunm1_112006, column2_112006 and so on etc. I'll appreciate any help.
Thanks in advance.
|
|
|
|
|
"select column1 as column1_112006,colum2 as column2_112006 from table1"
|
|
|
|
|
I don't want to use keyword "as" for 150 columns. Is there any way to rename using "select *" ?
|
|
|
|
|
Nope.
You could build your query dynamically in a stored procedure (Use schema to get the column names).
150 column table doesn't sound like a good design...
|
|
|
|
|
Rob Graham wrote: 150 column table doesn't sound like a good design...
Normalization could be a good idea
Some people have a memory and an attention span, you should try them out one day. - Jeremy Falcon
|
|
|
|
|
Hi... looking for some insight here...
Another site has a SQLServer 2000 database that huge... There data collection mechanism has been modified and the growth rate is now severely reduced, but, in the mean time, I still have to delete approximately 3/4 of the data.
The process has been started, but, over the weekend, the database added another extent (20%). There is concern that the deletion process is causing the database to grow.
To date, I have deleted approximately 1 1/2 % of the data.
My questions are:
what happens to the deleted space? is it automatically reused?
what effect will a shrink have on the datbase?
Ultimately, we will delete no longer needed data, archive to another database anything over 2 years old and reindex the entire database, but, that is still a long way off.
Any ideas? If possible, links to reference material would be helpful.
And, I am not the DBA, just the person tasked with the cleanup.
Thanks,
Tim
|
|
|
|
|
Tim Carmichael wrote: I still have to delete approximately 3/4 of the data.
Wouldn't it make more sense to copy the 25% you want to keep to a new database, then drop the old database?
Tim Carmichael wrote: , over the weekend, the database added another extent (20%). There is concern that the deletion process is causing the database to grow.
Does the data you are removing reside in tables with clustered indexes? If so, is the order in which you are deleting the old date likely to free whole pages in such a way that new data can recycle the pages, or will new pages still be required to maintain physical page order of the clustered index?
|
|
|
|
|
Rob Graham wrote: Wouldn't it make more sense to copy the 25% you want to keep to a new database, then drop the old database?
If I had that option, it would be wonderful, however, this is a 24/7 production environment and I cannot recreate and move the data.
There are both clustered and unclustered indexes on the tables.
|
|
|
|
|
Tim Carmichael wrote: s is a 24/7 production environment and I cannot recreate and move the data.
But you can afford to let the database grow by 20% increments? which suggests that disk space is not a problem... Could you not select the data you wish to keep into a new table (in reasonable chunks to keep the transaction log manageable, and when you reach the last chunk, rename both old an new tables in the same transction (so new data starts going to the new table). Next just drop the old table and then shrink the database.
As others have mentioned allowing % based growth is very bad, particularly large percentages of large databases - the growth step is a very resource consuming operation. It is better to run big dbs like this at a fixed size (no growth), and run a free space monitor / purge routine on a regular basis (frequently enough to reclaim space before it can fill up by deleting or moving data).
|
|
|
|