|
Are you using SQL Reporting Services by any chance?
Use IsDBNull function instead of IsNothing. The null value returned by database is not the same as NOTHING or NULL.
"A democracy is nothing more than mob rule, where fifty-one percent of the people may take away the rights of the other forty-nine." - Thomas Jefferson
"Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." - Benjamin Franklin
Edbert
Sydney, Australia
|
|
|
|
|
Hi everyone,
I try to create Cubes with Analysis Services in Visual Studio (C#) 2005, but my problem is...
... I created the datasource, datasourcesight, the cube and dimensions, but if I try to compile it and add it to SQL Servermanagement Studio it means, that it can't be added to the server cause the name might be wrong...
Sorry I am from germany and so I only have the german errorlog:
Fehler 1 Das Projekt konnte aufgrund der folgenden Konnektivitätsprobleme nicht auf dem Server 'test' bereitgestellt werden: Es kann keine Verbindung hergestellt werden. Stellen Sie sicher, dass der Server ausgeführt wird.. Überprüfen oder aktualisieren Sie den Namen des Zielservers, indem Sie mit der rechten Maustaste im Projektmappen-Explorer auf das Projekt klicken. Wählen Sie 'Projekteigenschaften' aus, klicken Sie auf die Registerkarte 'Bereitstellung', und geben Sie dann den Namen des Servers ein.
-> the server 'test' is just for this errormessage.
... my knowledge: it just means that the connection with the server failed, because I typed the wrong servername into the project
greetz
|
|
|
|
|
Hello Sir
I had tried All This link,
But it is not working.
My Sqlserver is on local machine which is connected in a netork. On which internet connection is through D-link router.
i am passing user id and password also.
I want to access sqlserver 2005 through internet (i.e Web application)
it gives following eror
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
|
|
|
|
|
1. Is your connection string correct? (the server name, credentials etc.)
2. Is the server running? (Check the related services)
3. Have you enabled remote connectivity? (It is disabled by default and can be enable using Surface Area Configuration)
Hope this helps.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi,
Yes My Connection Sting Is Correct.
And My Server is Also Running,
Yes I enable Remote Connectivity,
I created A Website ,
When i run it from local network
it execute properly.
When i run it from
Internet it gives following Error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Thank You
|
|
|
|
|
Well, to connect to remote SQL server, all you need is IP address of the server, port number(1433 by default) and credentials.
Is your server behind firewall? See this[^] link.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
|
Is the SQL browser service on? Seriously, if these things are correct then you should be able to connect to the server.
If you are using ASP.Net, check out the membership provider and role provider properties as well.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Yes SQL browser service is On
|
|
|
|
|
Try to ping that server with its name from different locations and see if you can see it
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Try to do this we use to do connect to remote servers and uses odbc connection your port address should be 1433
goto SQL Server Configuration Manager ----> Network configuration ------> Protocols for your Server
and see Named Pipes and TCPIP should be enable , you can use either one of them at a time
also make sure you to check aliases and your SQL Browser is running and in connection string try server name
like ".\SQLServer" not "machineName\instanceName"
and are you using sql express then also see your configuration file located in
C:\WINDOWS\Microsoft.NET\Framework\yourFrameWOrkVersion
I hope so it will solve the problem
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
I have 2 columns in the table.
Want to create script for new column, and it's IS_Nullable value should be No.
Can u please provide me teh script to do so?
|
|
|
|
|
if not exists(Select * from syscolumns where name ='yourfldname' and id in(Select id from Sysobjects where xtype ='U' and name ='yourtablename'))
ALTER TABLE yourtablename add yourfieldname bit default(0) not NULL
Best Of Regards,
SOFTDEV
Sad like books with torn pages, sad like unfinished stories ...
|
|
|
|
|
hi experts
in my table i have a column with name Date and id
Date id
2009-7-13 218665
2009-7-14 218665
2009-7-15 218665
2009-7-16 218665
2009-7-19 218665
2009-7-20 218665
2009-7-21 218665
i want to know weather rows r present from one date to another like from date and to date
if i have give from date =2009-7-13 and to date = 2009-7-20 it shuld compare with the date column it should not show all the rows are present because 200-7-17 is not available....
if i have given from date = 2009-7-12 and to date= 2009-7-16 even it shuld not show because 2009-7-12 is not present and vice versa
plz guide me
|
|
|
|
|
How about this?
if(exists(select col1 from temptable where col1 = @fromDate or col1 = @toDate))
begin
select col1,col2 from tablename
where (col1 between @fromDate and @toDate)
end
else
begin
select 'Table does not contains one of the date.'
end
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
no friend it was not working even the columns r getting which r out of dates
|
|
|
|
|
Missed out the first part. Sorry.
AFAIK you will need to write a while loop to do this matching all the dates between the range. But beware, from whatever I have read in the forums, looping techniques might cause performance related issues.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
can u work out on that iam not getting good idea abt while loop
|
|
|
|
|
venu656 wrote: can u work out on that
Will I get paid for that? I guess no. Then I wont.
Here are the links that will help you.
While loop in SQL[^]
DateAdd function in SQL[^]
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
no yaar i cant pay iam still under bankrupt so let me describe that
|
|
|
|
|
your database should store dates and datetimes as such, not as strings. stringed dates just beg for problems.
|
|
|
|
|
thats not a big problem of string i want to know how to check each and every field in the date
|
|
|
|
|
when you store dates as real dates, not strings, you could use date functions[^]; stored as strings, you can try and apply string substringing, however you could be subject of regional setting difference problems.
|
|
|
|
|
If there can only be one entry per date then you can compare the number of rows returned with the number of days between the two dates.
Other than that I cannot help.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hai sir
the date is one fiels but we are comparing here one fiels with fromdate and todate
|
|
|
|