SQL Server Agent will not start

Believe this problem is because I had SQL Server 2008 on my machine and then added SQL Server 2008 R2. Today I had renamed the old MSSQL10 directories with a zz at front to mark them as old. Then SQL Server Agent did not start.
First I had:
Error message when you use SQL Server Configuration Manager to restart the SQL Server Agent service in SQL Server 2008:
“The request failed or the service did not respond in a timely fashion”
http://support.microsoft.com/kb/955494
Suggested using Start > Administrative Tools > Services or Services.msc and start from there.

This led to next problem
The SQL Server Agent (MSSQLSERVER) service on Local Computer started and then stopped.  Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.
http://blogs.msdn.com/b/sqlserverfaq/archive/2009/06/12/unable-to-start-sql-server-agent.aspx
Found that the registry entry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\SQLServerAgent
ErrorLogFile key was pointing at a location which was 2008 not 2008 R2
Chnaged the key value and SQL Server Agent started OK

SOLVED

SQL Database Restore: Cannot access the specified path or file on the server

“locate backup file cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the file name control in the locate dialog box.”

Solution:
Start > Programs > SQL Server Conifguration Manager > SQL Server Services
Find SQL Server in list and identify the Log On As account

Then go to the backup file location and give permissions to that account. Should now work

All TableAdapters managed by a TableAdapterManager must use the same connection string

All TableAdapters managed by a TableAdapterManager must use the same connection string

http://social.msdn.microsoft.com/Forums/en/adodotnetdataset/thread/f172a9f6-e59a-49b5-818e-bd86f5a3bfa2

Can happen because one connection string has Persist Security Info=True and one does not
Make sure each connection string is the same.

Cannot bind to the property or column .. on the datasource.

VB.Net Window Forms databinding

Cannot bind to the property or column .. on the datasource.
Parameter name: dataMember

  1. Check to see if you have used the same binding source for two or more combo boxes.
  2. or alternatively because dataMember is not strongly typed, possible that the name of a field has changed in the data set, but not in the form

..Row cannot be cast to ..Row when appear to be same. InvalidCastException

rowTS = CType(TimeSheetBindingSource.Current, DataRowView.Row, dsMyCo.TimeSheetRow

A first chance exception of type ‘System.InvalidCastException’ occurred in MyCompany.exe

[A]TimeSheetRow cannot be cast to [B]TimeSheetRow. Type A originates from ‘ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location ‘Project…\bin\Debug\ProjectName.exe’. Type B originates from ‘ProjectName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null’ in the context ‘Default’ at location Project…\bin\Debug\ProjectName.exe’.

Check you are converting from Rows in the same dataset. So if a table appears in more than one dataset check you are using the correct one.

form.designer.vb InitializeComponent bug deleting remaining controls

At top of frm.designer.vb there is following code.
If get really stuck then rem out System.Diagnostics…. and put a breakpoint here
You may want a try catch block around code that opens the form