Showing posts with label trouble. Show all posts
Showing posts with label trouble. Show all posts

Wednesday, March 28, 2012

One Database or More

A bit of advice needed, as I'm having trouble figuring out whether I need to create multiple SQL Server databases or just one...or if it is a matter of choice.

Say I'm creating Website A that does one thing.

And Website B that does another thing.

But each one has common core underlying tables (customers, cargos, ports, etc) that they both use.

Am I best just creating one database or several? Then am I best creating two or three (A,B and core tables)?

Not that used to SQL server at the moment, and this will be a complete backend for the companies main core business, crm, quality, etc - all distinct apps so to speak, but the data has common underlying tables and they will want to cross-reference data.::Am I best just creating one database or several?

This absolutly and 100% depends on whether you want them or not.

In this case:

::Not that used to SQL server at the moment, and this will be a complete backend for the
::companies main core business, crm, quality, etc - all distinct apps so to speak,

No, these are NOT distinct apps. They are all parts of one suite running the company. In this case it is absolutly best to run all this:

* From one database
* with ONE SET OF BUSINESS OBJECTS.|||Yes - part of one suite. Thanks.

Friday, March 23, 2012

OMG, Having so much trouble connecting my SQL database/server to Dreamweaver

I think its my server because I cant get it to link up to an Access data base
either, heres the error I get.
[DBNETLIB]ConnectionOpen (Connect()),]SQL Server does not exist or access
denied.
Im pretty sure that all the fields that I entered are correct though.
What could be the problem?
The connection string is right I believe. How do i configure the network
protocol?
Jean-Pierre Riehl wrote:[vbcol=seagreen]
>What is your connection string ?
>Have you configure the right network protocol in SQL Server Configuration
>Manager ?
>--
>Jean-Pierre Riehl
>http://www.blog.djeepy1.net
>http://www.bewise.fr
>[quoted text clipped - 6 lines]
|||To configure your allowable network protocols...
SQL 2000 you are going to use the "Server/Client Network Utilities" located
in your program files...
http://msdn2.microsoft.com/en-us/library/aa213770(SQL.80).aspx
Basically make sure that TCIIP is in the enabled box.
In SQL 2005 you can use your "Surface Area Configuration" Tool
http://msdn2.microsoft.com/en-us/library/ms173748.aspx
thanks,

/*
Warren Brunk - MCITP,MCTS,MCDBA
www.TechIntSolutions.com
www.RealWorldSQL.com
*/
"Qaiphyx" <u40439@.uwe> wrote in message news:7dcd267ca767e@.uwe...
> The connection string is right I believe. How do i configure the network
> protocol?
> Jean-Pierre Riehl wrote:
>

OMG, Having so much trouble connecting my SQL database/server to Dreamweaver

I think its my server because I cant get it to link up to an Access data base
either, heres the error I get.
[DBNETLIB]ConnectionOpen (Connect()),]SQL Server does not exist or access
denied.
Im pretty sure that all the fields that I entered are correct though.
What could be the problem?What is your connection string ?
Have you configure the right network protocol in SQL Server Configuration
Manager ?
--
Jean-Pierre Riehl
http://www.blog.djeepy1.net
http://www.bewise.fr
"Qaiphyx" <u40439@.uwe> wrote in message news:7dcaeb7bf1706@.uwe...
>I think its my server because I cant get it to link up to an Access data
>base
> either, heres the error I get.
> [DBNETLIB]ConnectionOpen (Connect()),]SQL Server does not exist or access
> denied.
> Im pretty sure that all the fields that I entered are correct though.
> What could be the problem?
>|||The connection string is right I believe. How do i configure the network
protocol?
Jean-Pierre Riehl wrote:
>What is your connection string ?
>Have you configure the right network protocol in SQL Server Configuration
>Manager ?
>--
>Jean-Pierre Riehl
>http://www.blog.djeepy1.net
>http://www.bewise.fr
>>I think its my server because I cant get it to link up to an Access data
>>base
>[quoted text clipped - 6 lines]
>> What could be the problem?|||To configure your allowable network protocols...
SQL 2000 you are going to use the "Server/Client Network Utilities" located
in your program files...
http://msdn2.microsoft.com/en-us/library/aa213770(SQL.80).aspx
Basically make sure that TCIIP is in the enabled box.
In SQL 2005 you can use your "Surface Area Configuration" Tool
http://msdn2.microsoft.com/en-us/library/ms173748.aspx
thanks,
/*
Warren Brunk - MCITP,MCTS,MCDBA
www.TechIntSolutions.com
www.RealWorldSQL.com
*/
"Qaiphyx" <u40439@.uwe> wrote in message news:7dcd267ca767e@.uwe...
> The connection string is right I believe. How do i configure the network
> protocol?
> Jean-Pierre Riehl wrote:
>>What is your connection string ?
>>Have you configure the right network protocol in SQL Server Configuration
>>Manager ?
>>--
>>Jean-Pierre Riehl
>>http://www.blog.djeepy1.net
>>http://www.bewise.fr
>>I think its my server because I cant get it to link up to an Access data
>>base
>>[quoted text clipped - 6 lines]
>> What could be the problem?
>

Saturday, February 25, 2012

OLE DB Command

I am having trouble figuring out how to use the OLE DB Command (for updating a record). On the first tab (Connection Managers), I can select my database server under 'Connection Manager'. When I looked at the second tab (Component Properties) I thought, this does not seem to have anything related to choosing a data TABLE to use. The third and fourth tabs do not seem to work because they require an output and none is there, and I can't add one (?)

When I selected the 3rd tab, I see the following at the bottom of the window :

Error at ReadAL3Files [OLE DB Command [6638]]: An OLE DB error has occured. Error code: 0x80040E0C. An OLE DB record is available. Source "Microsoft SQL Native Client" Hresult: 0x80040E0C Description: "Command text was not set for the command object"

So I look at the properties for the components, to see if there is one where 'text' is not set. Then I think, maybe I have to enter the update statement directly (under SQL Command). There didn't seem to be a way to build this kind of statement, so I guessed at the syntax

update [dbo].[BriteMeter]
set sampledatetime = [Column_7],
GradeID = [Column_8]
where SampleID = SampleID;

and switching to tab 3 and 4 showed a different error :
Statement(s) could not be prepared
Invalid column name 'Column 8'
Invalid column name 'Column 7'

I've tried entering those column names as described here : http://technet.microsoft.com/en-us/library/ms141138.aspx. Tried putting them in quotes, square brackets, I always get that error.

Am I approaching this right or am I missing something?

Dear Friend,

Create the update SQL statment inside database as a stored procedure with input and output parameters.

And in the OLE DB Command text property write: EXEC StoredProcedure ?,?

This example has 2 input parameters.

In my blog check the label SSIS and there is an example.

Helped?

regards!

|||Seriously? There is no simpler way to do an update than this? Well... ok.

|||

Dear friend,

In my opinion, is the better way to do that. The most advantages with this way is that:

1. You avoid SQL injection

2. The SP is already compiled in your database.

3. in the case you need to make some changes, you only need to change the SP in spite of change the stored procedure...

Helped? :-(

I hope so... if not tell me!

Kind regards!

Monday, February 20, 2012

Old data from mdf deleting problem again!

Hello Guys!

Thanks for your previous posts to me, but I'm still in trouble.
I have card.mdf file and I need to delete data older than 3
months from the table called Events.
I tried the following:

use card.mdf
delete from Events where datediff(m,Field Time,getdate()) >= 3

"Field date" is the name of the colums where dates are logged.
But in query analyser it says that there is an error near "Time"
What am I doing wrong.

Please help me,
JessicaI suspect that your problem is caused because of the space in the "Field Time" column name. I think you will need to put quotes around this column and try again.|||Originally posted by dbabren
I suspect that your problem is caused because of the space in the "Field Time" column name. I think you will need to put quotes around this column and try again.

Sorry, I meant square brackets (doh!)

ie
delete from Events where datediff(m,[Field Time],getdate()) >= 3|||Thanks a lot dbabren, It now worked.
But do you know How I could run this
from dos command line?

Jessica|||Jessica

I assume that you mean it works via osql. I don't know is the short answer! I can only assume that the Syntax checker is not as strict in osql as it is in Query Analyser.|||Try this

use card.mdf
delete from Events where datediff(m,[Field Time],getdate()) >= 3

add [ ] around your column name.