Showing posts with label couple. Show all posts
Showing posts with label couple. Show all posts

Friday, March 30, 2012

new to sql please help

i use access 2000 as my front end. i had a form named main with a couple of unbound fields on it . i used to put in last name and first name and then in a query i would put "like [forms]![main]![text0] & "*"
and also "like [forms]![main]![text2] & "*"

the lookup patient button would open my patient form based on the query results of what i typed in on the main form . ex: i type in riley it would give me my patient form with all the riley's in it.

how do i get my access form to open from information i am looking for in a query now that my whole database is back on a sql server.

by the way i upsized to a adp file no longer using mdb. please if possible explain in detail how to do this as i am having trouble with the syntax of sql. i understand i cant use "*" as a wildcard now but % instead.

thanks in advance.Hoe are you connecting to SQL Sever?

You shouldn't have to change your code...did you create linked tables?|||im assuming they not linked tables since it is now a access project i dont see the little globe when i used to use link tables.

i think everything is useing passthorugh queries now all my tables are on the sql server. just the forms and macros are on the frontend now.

my code i had to change was something like

dim db as dao.database
dim rs as dao.recordset

i had to change that to
dim conn as adodb.connection
dim rs as new adodb.recordset

and quite a few other things

if i left them linked the queries should have stayed working but im trying to get away from passing things through the jet engine and using the full power of sql .|||this was my old code to make a chartnumber based on the first and last name fields. this is the one that didnt work .

Public Function chartlookup()
Dim db As DAO.Database <--believe to be the problem
Dim rs As DAO.Recordset <-- belive to be the problem
Dim SQL As String
Dim NewNum As Integer
Dim NeWChartNum As String

SQL = "Select max(Cint(Right([chartnumber],6))) As RecNum From tblpatientinfo WHERE UCase(Left([chartnumber],5)) = '" & UCase(Left([Forms]![fpatient]![lname], 3)) & UCase(Left([Forms]![fpatient]![fname], 2)) & "'"

Set db = CurrentDb() <-- -problem
Set rs = db.OpenRecordset(SQL) <--problem

If IsNull([Forms]![fpatient]![chartnumber]) = False Then GoTo 400

If rs.EOF = False Then
If IsNull(rs!RecNum) = False Then
NewNum = rs!RecNum + 1
Else
NewNum = 1
End If
End If
'If NewNum = 1 Then

[Forms]![fpatient]![chartnumber] = UCase(Left([Forms]![fpatient]![lname], 3)) & UCase(Left([Forms]![fpatient]![fname], 2)) & Format(NewNum, "000000")
'End If|||Well this is a TOTAL guess...

If you're doing passthrus, you'll need SQL Server syntax..

(Why not just call stored procedures if you're making such a radical change?)

anyway...

SQL = "SELECT (MAX(CONVERT(int,(RIGHT(chartnumber))))
FROM tblpatientinfo
WHERE UPPER(LEFT(chartnumber,5)) = " _
& "'" UCase(Left([Forms]![fpatient]![lname], 3)) & UCase(Left([Forms]![fpatient]![fname], 2)) & "'"

my front end skills have gotten rusty...

You might want to also look to post here:

http://www.sqlteam.com/forums/forum.asp?FORUM_ID=3|||i did get that code to work but my main real problem is how do i get user sitting at my main form where he has to enter a patients lst name and first then when he hits the lookup patient button it opens my patient record with only the patient he typed in from the previous form . this was easy on access just added the expression into the query . but sql doesnt seem to support forms based queries. so what i really need is what does sql use instead of forms based queries to prompt a user for what they want to fill a record with.

if i use select lname from tblpatientinfo where lname="riley"

my form will only give me patients with last name riley

but how do i get it to ask what name we are looking for i guess would be the real question here. do i make a stored procedure to prompt for the information and base the form on the stored procedure or does my from on open have to request what im looking for. i may not be useing the correct wording so please be patient but sql is a whole new world to me.
i tried useing a filter on my form but if i put the stored procedure in the filter it doesnt recognize the stored procedure name only access query names it seems.

Wednesday, March 28, 2012

New to MS Sql

Hello;

I have just been hired at a new company which is a small auto insurance
company. They have a package they purchased a couple of years ago
which uses MS Sql as their database backend, ASP as their user
interface, and Micro Focus Cobol as their business logic engine.
Right, wrong, or neutral it is what it is and I believe it conforms to
my understanding of n-tier application. I have at this time no desire
or need to change this as it is supported by our vendor and is meeting
the current needs of the users.

My most immediate job objectives is to create a substantial number of
reports, both hard copy and electronic, and specialized quieries to
meet day to day requirements.

Currently there are a couple of consultants/contract programmers
currently employed using MS Access.

It is my understanding that there will be the need to create other
subsystems in the future which will have to interface into the SQL
databases as well a create other databases.

My question is,

Is MS Access a resonable and viable option of should I be looking at
other development software and if so some suggestions would be
appreciated.

Thanks
LenHi

MS Access may meet the both your current and future needs, from your
description it is hard to say what your requirements are really going to be,
but if it doesn't meet your requirements you may want to look at Reporting
services http://www.microsoft.com/sql/reporting/default.asp

John

<lsumnler@.gmail.com> wrote in message
news:1113148371.503295.133090@.z14g2000cwz.googlegr oups.com...
> Hello;
> I have just been hired at a new company which is a small auto insurance
> company. They have a package they purchased a couple of years ago
> which uses MS Sql as their database backend, ASP as their user
> interface, and Micro Focus Cobol as their business logic engine.
> Right, wrong, or neutral it is what it is and I believe it conforms to
> my understanding of n-tier application. I have at this time no desire
> or need to change this as it is supported by our vendor and is meeting
> the current needs of the users.
> My most immediate job objectives is to create a substantial number of
> reports, both hard copy and electronic, and specialized quieries to
> meet day to day requirements.
> Currently there are a couple of consultants/contract programmers
> currently employed using MS Access.
> It is my understanding that there will be the need to create other
> subsystems in the future which will have to interface into the SQL
> databases as well a create other databases.
> My question is,
> Is MS Access a resonable and viable option of should I be looking at
> other development software and if so some suggestions would be
> appreciated.
> Thanks
> Len|||"Entia non sunt multiplicanda praeter necessitatem." (No more things
should be presumed to exist than are absolutely necessary) -- William
Occam (c. 1280-1349).

Why add a proprietary, rather weird language like ACCESS to a stable
COBOL shop?
You can port MicroFocus COBOL anywhere, unlike ACCESS.|||To help clarify things for me. Are you intending to us MS Access Project
whereas you can create a front-end for your SQL database (forms, reports,
etc) and still use all the features of MS SQL?

Akinja

"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:425951bd$0$2589$da0feed9@.news.zen.co.uk...
> Hi
> MS Access may meet the both your current and future needs, from your
> description it is hard to say what your requirements are really going to
> be, but if it doesn't meet your requirements you may want to look at
> Reporting services http://www.microsoft.com/sql/reporting/default.asp
> John
> <lsumnler@.gmail.com> wrote in message
> news:1113148371.503295.133090@.z14g2000cwz.googlegr oups.com...
>> Hello;
>>
>> I have just been hired at a new company which is a small auto insurance
>> company. They have a package they purchased a couple of years ago
>> which uses MS Sql as their database backend, ASP as their user
>> interface, and Micro Focus Cobol as their business logic engine.
>> Right, wrong, or neutral it is what it is and I believe it conforms to
>> my understanding of n-tier application. I have at this time no desire
>> or need to change this as it is supported by our vendor and is meeting
>> the current needs of the users.
>>
>> My most immediate job objectives is to create a substantial number of
>> reports, both hard copy and electronic, and specialized quieries to
>> meet day to day requirements.
>>
>> Currently there are a couple of consultants/contract programmers
>> currently employed using MS Access.
>>
>> It is my understanding that there will be the need to create other
>> subsystems in the future which will have to interface into the SQL
>> databases as well a create other databases.
>>
>> My question is,
>>
>> Is MS Access a resonable and viable option of should I be looking at
>> other development software and if so some suggestions would be
>> appreciated.
>>
>> Thanks
>> Len
>>

Monday, March 12, 2012

New Publication Error

Hi All,
A couple of months ago, I setup a transactional replication between 2
servers. In the last week, the publisher stopped replicating to the
subscriber for some unknown reason. When I was troubleshooting the problem,
I tried to add a new publication and I received the error attached in the
screenshot.
I ran the DBCC CHECKDB on that DB and the results were ok.
Any help would be greatly appreciated.
Regards,
JN
Can't see the screenshot using the web interface to the newsgroup. Can you
post up the error message for us...
Cheers,
Paul Ibison
|||Sure thing...Error as follows:
"New Publication Wizard encountered one or more errors while retrieving the
list of databases on the 'servername'. The list of databases may not be
complete.
Additional Information:
An exception occured while executing a T-SQL statement or batch
(Microsoft.SqlServer.ConnectionInfo)
The operating system returned error 21 (The device is not ready) to SQL
server during a read at offset 0x000000614d2000 in
file F:\TST\TSTDAT.mdf (not sure what this DB is?). Addtional messages
in the SQL Server error log and system event log my provide more detail.
This is a severe system level error condition that threatens database
integrity and must be corrected
immediatly. Complete a full database consistency check (DBCC CHECKDB).
This error can be caused by many factors; for
more information, SQL Server Books Online (MS SQL Error: 823)"
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:D538F184-0AC3-4CD2-AC4D-0029B4E0ED7E@.microsoft.com...
> Can't see the screenshot using the web interface to the newsgroup. Can you
> post up the error message for us...
> Cheers,
> Paul Ibison
>
|||I'd look to see what database the file F:\TST\TSTDAT.mdf corresponds to, then
run DBCC CHECKDB on this database. The info should be in sysaltfiles.
HTH,
Paul Ibison

Wednesday, March 7, 2012

New in SQL-NS 2005 ...plz help me

hi everyone...

Iam new in sql-ns 2005 & I've been trying the last couple of days to get my first running program...but still Iam facing a problem..

I tried to run this sample which I got from one the websites...

using System;

using Microsoft.SqlServer.Management.Smo;

using Microsoft.SqlServer.Management.Nmo;

using ns = Microsoft.SqlServer.NotificationServices;

namespace My_Nc

{

class Program

{

private static Instance nsi;

private static Application a;

private const string baseDirectoryPath =

@."D:\Documents and Settings\falmalik\My Documents\Visual Studio 2005\Projects\My_Nc";

private const string nsServer = //

private const string serviceUserName = //

private const string servicePassword = //

static void Main(string[] args)

{

Server server = new Server("(local)");

// create a new instance

NotificationServices ns = server.NotificationServices;

nsi = new Instance(ns, "StockWatch");

CreateDeliveryChannel();

a = new Application(nsi, "StockWatchApp");

a.BaseDirectoryPath = baseDirectoryPath;

CreateEventClass();

CreateSubscriptionClass();

CreateNotificationClass();

CreateHostedEventProvider();

CreateGenerator();

CreateDistributor();

CreateVacuumSchedule();

a.QuantumDuration = new TimeSpan(0, 0, 15);

a.PerformanceQueryInterval = new TimeSpan(0, 0, 5);

a.SubscriptionQuantumLimit = 1;

a.ChronicleQuantumLimit = 1;

a.VacuumRetentionAge = new TimeSpan(0, 0, 1);

nsi.Applications.Add(a);

Console.WriteLine("Added application.");

nsi.Create();

nsi.RegisterLocal(serviceUserName, servicePassword);

nsi.Enable();

Console.WriteLine("Application enabled." +

Environment.NewLine);

CreateSubscriber();

CreateSubscription();

Console.WriteLine(Environment.NewLine +

"Press any key to continue.");

Console.ReadKey();

}

the problem I get when I run it is with nsi.Create(); it gives me the following message :The Notification Services operation performed is invalid.

I don't know if the problem is with the nsServer,serviceUserName,servicePassword or not?

because i tried to change them alot of times but still ...it even some times gives me the problem with nsi.RegisterLocal(serviceUserName, servicePassword);

so what are the valid values of them?

I didn't really understand :serviceUserName is the account the NS$StockWatch Windows Service will run under

so could anyone please tell me what the problem is? or even could give me or direct me to a simple sample (even without the use of SMTP) ...I even tried the MSDN samples but still

another question is that i read more than once about the eventdata file ...& that I should copy it to the event subfolder to watch it....so do I have to do this everytime I run the application or what?

forgive me for my questions which may seem silly...but this is my first time

thank you..

First of all, the best way to learn SQL NS is by reading a good book and following examples in it. Of course, it might seem that it would take much more time than learning by an example on MSDN, but... it's not true. SQL NS, while being a relatively easy-to-learn technology, is not "a piece of cake".
The best 2 books that I know (and I used one of them to learn NS) are:
http://www.amazon.com/Microsoft-Server-Notification-Services-Windows/dp/0672326647/ref=sr_1_2/103-3024305-8379809?ie=UTF8&s=books&qid=1185276090&sr=1-2
and
http://www.amazon.com/Rational-Server-Notification-Services-Guides/dp/0972688811/ref=pd_bbs_sr_2/103-3024305-8379809?ie=UTF8&s=books&qid=1185276061&sr=8-2
There are also other books (specifically on NS for SQL Server 2005), but the differences between 2000 and 2005 are negligible.
The fact is, there's a lot to know if you are the only developer for your NS project, and you can't learn it fast enough without a good book.

You are using C# classes to create all of your NS objects. Although this approach is quite valid, the SQL NS is known for its declarative programming model. That is, it is much easier to create the entire NS application using XML files (application definition file, etc.). At the same time, you can use C# for creating your custom objects, such as a custom event provider, custom content formatter, etc., if you need customization.

When you install NS on your machine, it comes with a help file. In the help, there is a tutorial. It gives you step-by-step instructions on how to build an NS application. This tutorial is also available online at
http://msdn2.microsoft.com/en-us/library/ms170337.aspx (NS for SQL Server 2005)
or http://msdn2.microsoft.com/en-us/library/aa238959(SQL.80).aspx (if you are using SQL Server 2000).

Event data file:
This is one way of submitting "raw" data to your SQL NS app. Yes, you need to copy the new file (with new raw data) into the specified directory every time you have collected new data and want it processed.
There is another way of submitting raw data to your NS app: using a built-in SQL Event Provider. Basically, it means inserting data into a SQL Server table, and then SQL NS takes care of the rest: processing the new data, matching it against subscriptions, etc.
Also, you can create your own custom event provider, but this task should come only after you have no problems with the "basic" stuff...

So, briefly, I would recommend that you start with the tutorial, and get a good book.

|||

Sorry, I put it a wrong way: of course, the differences between NS 2.0 (for SQL Server 2000) and NS for SQL Server 2005 are NOT negligible.

What I was trying to say is: if you know NS for SQL Server 2000, it will take you only a couple of hours to learn what's new in NS 2005.

On the other hand, if you don't care about SQL Server 2000 and need NS 2005, get Shyam Pather's book (on NS 2005).

...and let's hope that Joe Webb will write another edition of his excellent book, this time for SQL Server 2005 (or, 2008).

|||

thanks for your post...

but I got 2 questions:

first : what should really be the values of nsServer,serviceUserName,servicePassword ?

because to be honest I've put for nsServer(the name of the server in SQL Managment studio)

& for serviceUserName,servicePassword ( the username & password that I login with it to windows)

Iam sure there is a problem here cause everyime I try to start the Ns from managment studio I get an error?

second: what I understood from your post is that the way I am using the C# classes does not let me or don't let me need the XML files ....but the sample Iam trying to follow infact uses it

http://en.csharp-online.net/Notification_Services%E2%80%94Creating_a_Notification_Services_Application_and_Service_2

so Iam kind of confuessd ....can you please clear this point to me?

Saturday, February 25, 2012

New Hardware

I have found a couple of web sites that discuss moving a sql server and its
database from one machine to another but nothing in good detail.
I have also looked out on the Knowledgebase and have found nothing as of
yet. I know there has to be some articles on this.
Anybody have a link to one?
Paul Bergson
In your Knowledge Base search you missed:
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default...;en-us;Q314546
Jacco Schalkwijk
SQL Server MVP
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
>I have found a couple of web sites that discuss moving a sql server and its
> database from one machine to another but nothing in good detail.
> I have also looked out on the Knowledgebase and have found nothing as of
> yet. I know there has to be some articles on this.
> Anybody have a link to one?
> --
> Paul Bergson
>
>
|||Actually this isn't what I need this is to move individual db's not the
entire system. It is required that I move all the system db's as well.
Paul Bergson
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid > wrote
in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> In your Knowledge Base search you missed:
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://support.microsoft.com/default...;en-us;Q314546
>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
> news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
its
>
|||Please clarify...
moving a few user databases OR all the databases (system and user)?
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --
|||1. backup your DBs on first server
2. restore your DBs on second server
3. on second server create user accounts that you wanted to transferred from
first server to second server
4. in each DB run sp_change_users_login 'Update_One' to map each database
user (select * from sysusers) to the new accts you just created in step 3.
You can write a cursor to run dynamically.
hth,
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --
> Paul Bergson
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid >
> wrote
> in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
> its
>
|||Go to google groups and search this NG for "move system database". IIRC,
Andrew Kelly has posted a rather complete list of links that cover this
frequently asked topic.
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --
> Paul Bergson
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid >
wrote[vbcol=seagreen]
> in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
> its
of
>
|||New hardware. Retiring the old sql server. I need to move everything...
Paul Bergson
"CD" <mcdye1@.hotmail.REMOVETHIS.com> wrote in message
news:#Nr$t#0SFHA.3636@.TK2MSFTNGP14.phx.gbl...
> Please clarify...
> moving a few user databases OR all the databases (system and user)?
>
> "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
> news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
>

New Hardware

I have found a couple of web sites that discuss moving a sql server and its
database from one machine to another but nothing in good detail.
I have also looked out on the Knowledgebase and have found nothing as of
yet. I know there has to be some articles on this.
Anybody have a link to one?
Paul BergsonIn your Knowledge Base search you missed:
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/defaul...b;en-us;Q314546
Jacco Schalkwijk
SQL Server MVP
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
>I have found a couple of web sites that discuss moving a sql server and its
> database from one machine to another but nothing in good detail.
> I have also looked out on the Knowledgebase and have found nothing as of
> yet. I know there has to be some articles on this.
> Anybody have a link to one?
> --
> Paul Bergson
>
>|||Actually this isn't what I need this is to move individual db's not the
entire system. It is required that I move all the system db's as well.
Paul Bergson
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
> In your Knowledge Base search you missed:
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://support.microsoft.com/defaul...b;en-us;Q314546
>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
> news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
its[vbcol=seagreen]
>|||Please clarify...
moving a few user databases OR all the databases (system and user)?
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --|||1. backup your DBs on first server
2. restore your DBs on second server
3. on second server create user accounts that you wanted to transferred from
first server to second server
4. in each DB run sp_change_users_login 'Update_One' to map each database
user (select * from sysusers) to the new accts you just created in step 3.
You can write a cursor to run dynamically.
hth,
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --
> Paul Bergson
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
> wrote
> in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
> its
>|||Go to google groups and search this NG for "move system database". IIRC,
Andrew Kelly has posted a rather complete list of links that cover this
frequently asked topic.
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --
> Paul Bergson
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
wrote
> in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
> its
of[vbcol=seagreen]
>|||New hardware. Retiring the old sql server. I need to move everything...
Paul Bergson
"CD" <mcdye1@.hotmail.REMOVETHIS.com> wrote in message
news:#Nr$t#0SFHA.3636@.TK2MSFTNGP14.phx.gbl...
> Please clarify...
> moving a few user databases OR all the databases (system and user)?
>
> "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
> news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
>

New Hardware

I have found a couple of web sites that discuss moving a sql server and its
database from one machine to another but nothing in good detail.
I have also looked out on the Knowledgebase and have found nothing as of
yet. I know there has to be some articles on this.
Anybody have a link to one?
--
Paul BergsonIn your Knowledge Base search you missed:
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
Jacco Schalkwijk
SQL Server MVP
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
>I have found a couple of web sites that discuss moving a sql server and its
> database from one machine to another but nothing in good detail.
> I have also looked out on the Knowledgebase and have found nothing as of
> yet. I know there has to be some articles on this.
> Anybody have a link to one?
> --
> Paul Bergson
>
>|||Actually this isn't what I need this is to move individual db's not the
entire system. It is required that I move all the system db's as well.
--
Paul Bergson
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
> In your Knowledge Base search you missed:
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
>
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
> news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
> >I have found a couple of web sites that discuss moving a sql server and
its
> > database from one machine to another but nothing in good detail.
> >
> > I have also looked out on the Knowledgebase and have found nothing as of
> > yet. I know there has to be some articles on this.
> >
> > Anybody have a link to one?
> >
> > --
> >
> > Paul Bergson
> >
> >
> >
>|||Please clarify...
moving a few user databases OR all the databases (system and user)?
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --|||1. backup your DBs on first server
2. restore your DBs on second server
3. on second server create user accounts that you wanted to transferred from
first server to second server
4. in each DB run sp_change_users_login 'Update_One' to map each database
user (select * from sysusers) to the new accts you just created in step 3.
You can write a cursor to run dynamically.
hth,
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --
> Paul Bergson
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
> wrote
> in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
>> In your Knowledge Base search you missed:
>> HOW TO: Move Databases Between Computers That Are Running SQL Server
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
>>
>> --
>> Jacco Schalkwijk
>> SQL Server MVP
>>
>> "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
>> news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
>> >I have found a couple of web sites that discuss moving a sql server and
> its
>> > database from one machine to another but nothing in good detail.
>> >
>> > I have also looked out on the Knowledgebase and have found nothing as
>> > of
>> > yet. I know there has to be some articles on this.
>> >
>> > Anybody have a link to one?
>> >
>> > --
>> >
>> > Paul Bergson
>> >
>> >
>> >
>>
>|||Go to google groups and search this NG for "move system database". IIRC,
Andrew Kelly has posted a rather complete list of links that cover this
frequently asked topic.
"Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> Actually this isn't what I need this is to move individual db's not the
> entire system. It is required that I move all the system db's as well.
> --
> Paul Bergson
>
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
wrote
> in message news:e3TqbC0SFHA.3184@.TK2MSFTNGP15.phx.gbl...
> > In your Knowledge Base search you missed:
> >
> > HOW TO: Move Databases Between Computers That Are Running SQL Server
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
> >
> >
> > --
> > Jacco Schalkwijk
> > SQL Server MVP
> >
> >
> > "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
> > news:ueLrT3zSFHA.2128@.TK2MSFTNGP15.phx.gbl...
> > >I have found a couple of web sites that discuss moving a sql server and
> its
> > > database from one machine to another but nothing in good detail.
> > >
> > > I have also looked out on the Knowledgebase and have found nothing as
of
> > > yet. I know there has to be some articles on this.
> > >
> > > Anybody have a link to one?
> > >
> > > --
> > >
> > > Paul Bergson
> > >
> > >
> > >
> >
> >
>|||New hardware. Retiring the old sql server. I need to move everything...
--
Paul Bergson
"CD" <mcdye1@.hotmail.REMOVETHIS.com> wrote in message
news:#Nr$t#0SFHA.3636@.TK2MSFTNGP14.phx.gbl...
> Please clarify...
> moving a few user databases OR all the databases (system and user)?
>
> "Paul Bergson" <pbergson_nospam@.allete.com> wrote in message
> news:u8PWyq0SFHA.3684@.TK2MSFTNGP10.phx.gbl...
> > Actually this isn't what I need this is to move individual db's not the
> > entire system. It is required that I move all the system db's as well.
> >
> > --
>

Monday, February 20, 2012

New Crystal Reporter

Hi everyone. I've been developing an application which needs to create a couple of reports. I was going to use microsoft Graph for the Charts but it turns out that that's not recommendable.

So I decided to get into Crystal Reports. The point is that the help I've found is somewhat generic and I need something a little more specific.

What I need to do is to show a chart with the completed and not completed sales in a specific month. And show another form with the percentages of this sales.

I'm using VB6 and an Access database for my project.

If anybody knows where can I find some help... please let me know

Thanx in advance :wave:Create a query in access that summarizes your sales data by month, giving a field for Year & Month, and fields for Complete and Incomplete.
Use the Report Expert to connect to the Access Database, once connected you should see your query exposed as a Stored Procedure.
Select the query, and select field you wish to show, and then group by month.

When done, you should be able to right-click on the Group Header and select ChangeGroup. If you have a properly formated date CR will auto-recognise and type the field as date, and you should see a dropdown combo with caption "The section will be printed".
Select "for each month" from the combo.

When designing the Chart, select Advanced in the Data tab, and in the "Place Chart" combo, you should be able to select the group name, if you want to print the chart for each month, or select once per report option. Later you will put the Chart in the Group Footer if you selected the option to print each change of date (which in this case means each month, cos that's the group selection formula you selected), or put it in the report footer if you selected the "Once per Report" option.
Then select the summary fields that your SQL statement created from the list named "Available Fields" and put them in the "ShowValue(s)" list.
Oh, and don't forget to select an option for the combo above the "Show Values" one.

That just about ought to get you close......

Dave|||Create a query in access that summarizes your sales data by month, giving a field for Year & Month, and fields for Complete and Incomplete.
Use the Report Expert to connect to the Access Database, once connected you should see your query exposed as a Stored Procedure.
Select the query, and select field you wish to show, and then group by month.

When done, you should be able to right-click on the Group Header and select ChangeGroup. If you have a properly formated date CR will auto-recognise and type the field as date, and you should see a dropdown combo with caption "The section will be printed".
Select "for each month" from the combo.

When designing the Chart, select Advanced in the Data tab, and in the "Place Chart" combo, you should be able to select the group name, if you want to print the chart for each month, or select once per report option. Later you will put the Chart in the Group Footer if you selected the option to print each change of date (which in this case means each month, cos that's the group selection formula you selected), or put it in the report footer if you selected the "Once per Report" option.
Then select the summary fields that your SQL statement created from the list named "Available Fields" and put them in the "ShowValue(s)" list.
Oh, and don't forget to select an option for the combo above the "Show Values" one.

That just about ought to get you close......

Dave

Thanx Dave... I know this maybe a little abusive but, do you have some code so I have another reference?

Anyway... thanx for your reply, I'll try to get it running :wave:|||Do you mean the SQL, or code for the report?
Need to work out what you do and don't know......
Only real code in this is SQL, aprt from a formula you'd need to sum the values of Completed and Not Completed, so something like:

SELECT Id, Date, Completed, Value from Sales WHERE (Sales.Date > DateAdd("d", -14, Date()) AND Sales.Date <= Date())

would give you last 14 days of data.
I'd make Completed field a boolean so you can use it in the report to apply logic to an aggregation.

I've attached a zip file with a small table layout in Excel format. You can import it into Access and then open the report.
You may have to reset the Location to ensure that the ODBC connection on your box works Ok - see Database menu, Set Location... option.

Don't forget, if you find what I've given you useful, remember to rate the post and finalise the thread.

Dave|||I mean the CR Code. That's what I'm new at. The query is not that big of a deal (kind of hehe) but the problem is that I don't know how to import those results to a .rpt

I am checkin the zip you attached and hope to find out a way to create my graph. I'll rate the thread anyway.

Thanx a lot springsoft