Monday, March 26, 2012
Newbie Question
To export them to Access (mdb file), try linking to them through Access using ODBC connection.
Wednesday, March 21, 2012
newbie q: "contacting server to create web project" runs forever
Dell 9300 1.6 GHZ
XP pro 2004 w/service pack2
Hi,
It seems the problem is that the VS does not find your local server.
(Reason my be, you have changed your machin IP somtime after Installing the VS)
Check the server name on new project dialog box and if needed change
it to localhost or the IP address of your system.
newbie q: "contacting server to create web project" runs forever
Dell 9300 1.6 GHZ
XP pro 2004 w/service pack2
Hi,
It seems the problem is that the VS does not find your local server.
(Reason my be, you have changed your machin IP somtime after Installing the VS)
Check the server name on new project dialog box and if needed change
it to localhost or the IP address of your system.
Monday, March 12, 2012
Newbie help On Sql string form vb
I was trying the code:
SqlQuery = "SELECT TblEmpAttendance.Date, TblEmpAttendance.Value," & _
"TblEmployees.TotalPoints, TblEmployees.DaysWorked FROM TblEmployees RIGHT JOIN TblEmpAttendance ON TblEmployees.EmployeeID WHERE TblEmpAttendance.EmployeeID" & _
"= TblEmpAttendance.EmployeeID AND TblAttendance.EmployeeID=" & EmpID
Any help would be appreciated.
Thanks
-Greg S.Oops I already posted it but ill dbl chk anyhow. I got it to work using:
SqlQuery = "SELECT TblEmpAttendance.EmployeeID, TblEmpAttendance.Date, TblEmpAttendance.Value," & _
"TblEmployees.TotalPoints, TblEmployees.DaysWorked FROM TblEmployees RIGHT JOIN TblEmpAttendance ON TblEmployees.EmployeeID = TblEmpAttendance.EmployeeID WHERE TblEmployees.EmployeeID = " & EmpID
Is their anyhting that could cause problems with this statement?
Thanks
-Greg S
Friday, March 9, 2012
newbie confusion: file vs server
caution: this is not doubt a stupid newbie question...
In creating vs.net 2005 website, I can add a sql database to my project and a mdf file is created. I can create data providers against this file, etc, just as though it were a database in a sql server instance. I can deploy this dbf file to my finished web site.
Also, I can attach to a running instance of sql server 2005 express, and do exactly the same thing.
I can also take my mdf file created in step 1 above, and attach it to a running instance of sql server express.
Now, I have delt with access databases, and sql server 2000 databases, so this dual nature of sql server 2005 express confuses me a little.
Why would I ever need to use a server instance of sql server 2005 when I can use a file based data file in my web apps? Is there an advantage to one or the other?
I had a thought that when using the file based method, I was actually still using the server based stuff, which would explain why the sql server express notification bubble pops up when I debug on the dev machine.
In any case could someone explain the difference and should I install sql server 2005 express on my deployment server?
thanks.
Access is a database SQL Server Express is a SQL Server 2005 edition which is RDBMS(relational database management systems) without a SQL Server instance you don't have a database engine to run your MDF(Microsoft data file) it is just one of at least two files you need to run your database. Run a search for file groups in SQL Server BOL(books online). Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms179316.aspx
|||In order to use a *.mdf (SQL Server database file), you must have a SQL Server installed and running.
That could be SQL Server 2005 Express.
|||Thanks for the replies. I have a clearer picture but have some additional questions...
I add a mdf file to my asp.net website. This file requires some version of SQL server, in this case
Express, to provide the RDMS system. Great. So how is it that I can just deploy the app to the web server
and it works without installing SQL server Express on the web server?
Is SQL Server Express built into the ASP.Net 2.0 runtime?
If so, the file must somehow be dynamically attached to this instance of SQL Server Express?
How will this type of deployment be upgraded to a higher version of SQL Server? If I use the "file" based
technique, will my app always use the embeded SQL Server Express and not any fuller version of SQL Server
I may install?
So to migrate to a higher version of SQL Server, will I need to attach the mdf file to SQL Server and change my
connection string to point to the new version of SQL Server?
This is my last little stumbling block to grasping the SQL Server Express concept, thanks for your replies!
|||Perhaps this will clear some things up for you.
http://msdn2.microsoft.com/en-us/library/bb264564.aspx
|||yes, perfect. Thanks.
No doubt I over think these things.
While I appreciate the ease of use, I also like knowing what's going on, so the documentation is there, of course, but in such great volume one questions the point of reading massive amounts of documentation on an easy to use feature. ;-) I digress...thanks again.
Saturday, February 25, 2012
newbie - have backup file and trn file - how do I get it up and going?
I have a project to look into where I need to look into an MSSQL database.
I have been sent a file that contains a BAK file and a TRN file. I am told
this is a dump of the MSSQL database.
I have installed the evaluation version of SQL Server 2000 database onto my
Windows 2000 PC.
My first question is, am I going about it the right way, and what is the
first thing I want to do with regard to actually opening the database.
I looked into the Enterprise manager about restoring a database, but it did
not seem to let me choose a file location to restore from.
Any guidance or input would be appreciated.
Kind regards
Dave.Check out RESTORE DATABASE and RESTORE LOG in the BOL.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"David Smithz" <dave1900@.blueyonder.co.uk> wrote in message
news:HR%5g.63459$wl.12794@.text.news.blueyonder.co.uk...
Hello there,
I have a project to look into where I need to look into an MSSQL database.
I have been sent a file that contains a BAK file and a TRN file. I am told
this is a dump of the MSSQL database.
I have installed the evaluation version of SQL Server 2000 database onto my
Windows 2000 PC.
My first question is, am I going about it the right way, and what is the
first thing I want to do with regard to actually opening the database.
I looked into the Enterprise manager about restoring a database, but it did
not seem to let me choose a file location to restore from.
Any guidance or input would be appreciated.
Kind regards
Dave.|||It is probably easiest for you to read about the below commands in Books Online
RESTORE HEADERONLY
RESTORE FILELISTONLY
Use above two to investigate what is on those backup files. Then do the restore operations using
RESTORE DATABASE
RESTORE LOG
You probably have to use the MOVE option for above commands, guided but he output from RESTORE
FILELISTONLY.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Smithz" <dave1900@.blueyonder.co.uk> wrote in message
news:HR%5g.63459$wl.12794@.text.news.blueyonder.co.uk...
> Hello there,
> I have a project to look into where I need to look into an MSSQL database.
> I have been sent a file that contains a BAK file and a TRN file. I am told this is a dump of the
> MSSQL database.
> I have installed the evaluation version of SQL Server 2000 database onto my Windows 2000 PC.
> My first question is, am I going about it the right way, and what is the first thing I want to do
> with regard to actually opening the database.
> I looked into the Enterprise manager about restoring a database, but it did not seem to let me
> choose a file location to restore from.
> Any guidance or input would be appreciated.
> Kind regards
> Dave.
>
>
newbie - have backup file and trn file - how do I get it up and going?
I have a project to look into where I need to look into an MSSQL database.
I have been sent a file that contains a BAK file and a TRN file. I am told
this is a dump of the MSSQL database.
I have installed the evaluation version of SQL Server 2000 database onto my
Windows 2000 PC.
My first question is, am I going about it the right way, and what is the
first thing I want to do with regard to actually opening the database.
I looked into the Enterprise manager about restoring a database, but it did
not seem to let me choose a file location to restore from.
Any guidance or input would be appreciated.
Kind regards
Dave.Check out RESTORE DATABASE and RESTORE LOG in the BOL.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"David Smithz" <dave1900@.blueyonder.co.uk> wrote in message
news:HR%5g.63459$wl.12794@.text.news.blueyonder.co.uk...
Hello there,
I have a project to look into where I need to look into an MSSQL database.
I have been sent a file that contains a BAK file and a TRN file. I am told
this is a dump of the MSSQL database.
I have installed the evaluation version of SQL Server 2000 database onto my
Windows 2000 PC.
My first question is, am I going about it the right way, and what is the
first thing I want to do with regard to actually opening the database.
I looked into the Enterprise manager about restoring a database, but it did
not seem to let me choose a file location to restore from.
Any guidance or input would be appreciated.
Kind regards
Dave.|||It is probably easiest for you to read about the below commands in Books Onl
ine
RESTORE HEADERONLY
RESTORE FILELISTONLY
Use above two to investigate what is on those backup files. Then do the rest
ore operations using
RESTORE DATABASE
RESTORE LOG
You probably have to use the MOVE option for above commands, guided but he o
utput from RESTORE
FILELISTONLY.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"David Smithz" <dave1900@.blueyonder.co.uk> wrote in message
news:HR%5g.63459$wl.12794@.text.news.blueyonder.co.uk...
> Hello there,
> I have a project to look into where I need to look into an MSSQL database.
> I have been sent a file that contains a BAK file and a TRN file. I am told
this is a dump of the
> MSSQL database.
> I have installed the evaluation version of SQL Server 2000 database onto m
y Windows 2000 PC.
> My first question is, am I going about it the right way, and what is the f
irst thing I want to do
> with regard to actually opening the database.
> I looked into the Enterprise manager about restoring a database, but it di
d not seem to let me
> choose a file location to restore from.
> Any guidance or input would be appreciated.
> Kind regards
> Dave.
>
>
Monday, February 20, 2012
Newbee
just been given a project converting clipper app with Dbase files
into Windows using "CA Visual Objects"
Now my question: My objective is to keep the selling price of the app
as low as possible but I need SQL database.
MS SQL 2000 is 1st price I know but what els is available at minimal
cost. ?
Is MySql an option to look at ? and what pitfalls are there?
Gunterhttp://www.microsoft.com/sql/msde/
For what its worth my apps work with Oracle, MySQL and MSDE/SQL Server --
being able to utilize existing DB Server licensing is a big boon when it
comes to moving software.
"Gunter Dubber" <randdata@.icon.co.za> wrote in message
news:3ffda4a2.5352078@.news.tiscali.co.za...
> Hi All
> just been given a project converting clipper app with Dbase files
> into Windows using "CA Visual Objects"
> Now my question: My objective is to keep the selling price of the app
> as low as possible but I need SQL database.
> MS SQL 2000 is 1st price I know but what els is available at minimal
> cost. ?
> Is MySql an option to look at ? and what pitfalls are there?
> Gunter|||Hi
You may want to use MSDE as the database, but you will have to check the
licencing agreement to make sure you comply. This will give you the option
of upsizing to the Standard and Enterprise versions of SQL Server if
required.
You may want to check out:
http://www.microsoft.com/sql/evalua...w/default.asp#A
Also...your selling price will not be effected if you are selling into a
site that already has SQL server.
John
"Gunter Dubber" <randdata@.icon.co.za> wrote in message
news:3ffda4a2.5352078@.news.tiscali.co.za...
> Hi All
> just been given a project converting clipper app with Dbase files
> into Windows using "CA Visual Objects"
> Now my question: My objective is to keep the selling price of the app
> as low as possible but I need SQL database.
> MS SQL 2000 is 1st price I know but what els is available at minimal
> cost. ?
> Is MySql an option to look at ? and what pitfalls are there?
> Gunter
Newb question
environment for input to an Excel 2003 spreadsheet and have created the
following SQL view using:
SELECT dbo.MSP_PROJECTS.PROJ_NAME, dbo.MSP_TASKS.TASK_NAME,
dbo.MSP_TASKS.TASK_IS_MILESTONE
FROM dbo.MSP_PROJECTS CROSS JOIN
dbo.MSP_TASKS
WHERE (dbo.MSP_PROJECTS.PROJ_ID = 92) AND
(dbo.MSP_TASKS.TASK_IS_MILESTONE = 1)
My logic here is that this query will pull back all tasks that are
milestones from 'project 92' only. However, this query pulls back all
milestones from all projects... I have no idea why, could someone please
shed some light on this newb.
Many thanks,
Nock (SQL Newb, Australia)I think the CROSS JOIN might be a clue. I would just use a JOIN
"Nock" wrote:
> I am attempting to retrieve specific task related data from a Project serv
er
> environment for input to an Excel 2003 spreadsheet and have created the
> following SQL view using:
> SELECT dbo.MSP_PROJECTS.PROJ_NAME, dbo.MSP_TASKS.TASK_NAME,
> dbo.MSP_TASKS.TASK_IS_MILESTONE
> FROM dbo.MSP_PROJECTS CROSS JOIN
> dbo.MSP_TASKS
> WHERE (dbo.MSP_PROJECTS.PROJ_ID = 92) AND
> (dbo.MSP_TASKS.TASK_IS_MILESTONE = 1)
> My logic here is that this query will pull back all tasks that are
> milestones from 'project 92' only. However, this query pulls back all
> milestones from all projects... I have no idea why, could someone please
> shed some light on this newb.
> Many thanks,
> Nock (SQL Newb, Australia)|||it is because of the CROSS JOIN used to connect the MSP_PROJECTS and
MSP_TASKS tables. A cross join between two tables produces what is known as
a
Cartesian product, which is a table that contains all of the possible
combinations between the rows between the input tables. In other words, a
cross join between two tables X and Y with x and y rows respectively will
contain 1 row for each y rows for each row in X, for a total of x times y
rows.
What you probably want is something like this
SELECT dbo.MSP_PROJECTS.PROJ_NAME, dbo.MSP_TASKS.TASK_NAME,
dbo.MSP_TASKS.TASK_IS_MILESTONE
FROM dbo.MSP_PROJECTS INNER JOIN
dbo.MSP_TASKS ON dbo.MSP_PROJECTS.PROJ_ID =
dbo.MSP_TASKS.PROJ_ID
WHERE (dbo.MSP_PROJECTS.PROJ_ID = 92) AND
(dbo.MSP_TASKS.TASK_IS_MILESTONE = 1)
"Nock" wrote:
> I am attempting to retrieve specific task related data from a Project serv
er
> environment for input to an Excel 2003 spreadsheet and have created the
> following SQL view using:
> SELECT dbo.MSP_PROJECTS.PROJ_NAME, dbo.MSP_TASKS.TASK_NAME,
> dbo.MSP_TASKS.TASK_IS_MILESTONE
> FROM dbo.MSP_PROJECTS CROSS JOIN
> dbo.MSP_TASKS
> WHERE (dbo.MSP_PROJECTS.PROJ_ID = 92) AND
> (dbo.MSP_TASKS.TASK_IS_MILESTONE = 1)
> My logic here is that this query will pull back all tasks that are
> milestones from 'project 92' only. However, this query pulls back all
> milestones from all projects... I have no idea why, could someone please
> shed some light on this newb.
> Many thanks,
> Nock (SQL Newb, Australia)|||Nock,
What is the common column between the tables? n other words, does MSP_TASKS
have a foreign Key column to the Primary Key column on MSP_PROJECTS, or
vice-versa.
Whichever is the key column you should then use a standard JOIN statement.
If you want just the Tasks that are associated with Project 92, then you
should use the following...
SELECT proj.PROJ_NAME,
task.TASK_NAME,
task.TASK_IS_MILESTONE
FROM dbo.MSP_PROJECTS proj LEFT JOIN
dbo.MSP_TASKS task ON proj.{PK} = task.{FK}
WHERE (proj.PROJ_ID = 92)
AND (task.TASK_IS_MILESTONE = 1)
The LEFT Join will ensure you get all Project Data back together with any
Task data that is relevent, or NULL values if none present. If you use INNER
join then there will need to be at least one reacord in each table.
Enjoy,
"Nock" wrote:
> I am attempting to retrieve specific task related data from a Project serv
er
> environment for input to an Excel 2003 spreadsheet and have created the
> following SQL view using:
> SELECT dbo.MSP_PROJECTS.PROJ_NAME, dbo.MSP_TASKS.TASK_NAME,
> dbo.MSP_TASKS.TASK_IS_MILESTONE
> FROM dbo.MSP_PROJECTS CROSS JOIN
> dbo.MSP_TASKS
> WHERE (dbo.MSP_PROJECTS.PROJ_ID = 92) AND
> (dbo.MSP_TASKS.TASK_IS_MILESTONE = 1)
> My logic here is that this query will pull back all tasks that are
> milestones from 'project 92' only. However, this query pulls back all
> milestones from all projects... I have no idea why, could someone please
> shed some light on this newb.
> Many thanks,
> Nock (SQL Newb, Australia)|||Thanks Mark et al, much appreciated and great explanation.
I'm in one of those situations where I've been asked to become a 'SQL
person' in a day...
Loving life :)
Cheers,
Nock
"Mark Williams" wrote:
> it is because of the CROSS JOIN used to connect the MSP_PROJECTS and
> MSP_TASKS tables. A cross join between two tables produces what is known a
s a
> Cartesian product, which is a table that contains all of the possible
> combinations between the rows between the input tables. In other words, a
> cross join between two tables X and Y with x and y rows respectively will
> contain 1 row for each y rows for each row in X, for a total of x times y
> rows.
> What you probably want is something like this
> SELECT dbo.MSP_PROJECTS.PROJ_NAME, dbo.MSP_TASKS.TASK_NAME,
> dbo.MSP_TASKS.TASK_IS_MILESTONE
> FROM dbo.MSP_PROJECTS INNER JOIN
> dbo.MSP_TASKS ON dbo.MSP_PROJECTS.PROJ_ID =
> dbo.MSP_TASKS.PROJ_ID
> WHERE (dbo.MSP_PROJECTS.PROJ_ID = 92) AND
> (dbo.MSP_TASKS.TASK_IS_MILESTONE = 1)
> --
> "Nock" wrote:
>|||Try these sites for a general SQL overview...
http://www.w3schools.com/sql/sql_intro.asp
http://sqlzoo.net/
"Nock" <Nock@.discussions.microsoft.com> wrote in message
news:05979A9F-A3BC-401B-867F-CDC7114D2CE1@.microsoft.com...
> Thanks Mark et al, much appreciated and great explanation.
> I'm in one of those situations where I've been asked to become a 'SQL
> person' in a day...
> Loving life :)
> Cheers,
> Nock
> "Mark Williams" wrote:
>
as a
a
will
y
server
the
please