|
Hi Eddy,
As u told me,I open a new thread:SQL server name not found:Admin-PC\MSSQLSERVER,1433
but still not working yet
Thanks Eddy
(after this long collaboration between as i suggest if u like we meet in msn or skype as freinds ok
my skype is :elgafsiensi and my msn is:marwenG@hotmail.fr)
|
|
|
|
|
Tunisien86 wrote: As u told me,I open a new thread:SQL server name not found:Admin-PC\MSSQLSERVER,1433
Not a new thread, but a new project
A small application to "prove" that it works and to test whether all settings are correct.
Tunisien86 wrote: but still not working yet
You know the drill; we'd need code and an exception-message to diagnose something.
Tunisien86 wrote: Thanks Eddy(after this long collaboration between as i suggest if u like we meet in msn or skype as freinds ok
You're welcome. I'll add you to the list, I'm online once or twice every month
I are Troll
|
|
|
|
|
hi
i want to make a GIS application in .net 4.0
can any one provide me the Link of how to create spatial database in SQL 2005
and connecting it with c#
|
|
|
|
|
Spatial is new to SQL SERVER 2008. here is a tutorial[^]
|
|
|
|
|
|
thank u so much
jazak ALLAH
|
|
|
|
|
When we search with for "mobile" word, using "like" as follows:
select ID from Table where column like '%mobile%'
we can get: mobile, bile.
But we can not get mobility or mobilization in result, even though they are related words for mobile word we are searching for.
So, Do you have solutions to handle those related words, I mean when search for mobile, we can get in result the words mobility and mobilization?
modified on Thursday, May 6, 2010 3:07 PM
|
|
|
|
|
Abdul-Rhman Alsri wrote: related words for mobile word
Someone needs to define that relationship.
One way is to include that in your query
select ID from Table where column like '% mobile %'
or column like '% mobilization %'
or column like '% mobility %'
;
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
I need it in general, because the word I search for is not determined explicity, but it's also retrieved from database.
SELECT a.id AS [CampaignID],
b.id AS [ZoneID],
a.adheadline,
a.adtext,
a.displayurl,
a.targeturl
FROM adcampaign a
INNER JOIN adzone b
ON a.sitecategory = b.category
AND a.LANGUAGE = b.LANGUAGE
AND a.keyword LIKE '%' + b.keyword + '%';
|
|
|
|
|
Perhaps another table that links similar words is needed.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
What database product are you using? If you are using MS SQL you can use things like SOUNDEX and FREETEXT.
|
|
|
|
|
SELECT id FROM AdCampaign WHERE FREETEXT(Keyword, 'going');
Error:
Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'AdCampaign' because it is not full-text indexed.
|
|
|
|
|
One of the things I did in VS2008, was to call GetChanges on the dataset during the FormClosing event to determine if changes have been made but not saved. Doing this in VS2010 always returns a non-null value even if the dataset has not been changed. This is causing the user to be prompted if they want to save their changes even though they just selected the SAVE icon from the application which saves any changes. I even tried calling AcceptChanges but I still get a non-null value coming back from GetChanges.
Is this a bug, or did something change in VS2010. Is there another way to check this?
Thank you,
Glenn
|
|
|
|
|
When I click button Update this error is cccurred :
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'nvarchar'.
my SqlDataSource is:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:AdNetConnectionString %>"
SelectCommand="SELECT AdCampaign.CampaignName, AdCampaign.AdType AS [Campaign Type], AdCampaign.Date AS [Start Date], AdCampaign.Clicks, AdCampaign.Impr, AdCampaign.DailyBudget AS [Daily budget] , AdCampaign.Status FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = @EmailAddress)"
UpdateCommand="UPDATE AdCampaign SET DailyBudget = 30 FROM Account INNER JOIN AdCampaign ON Account.ID = AdCampaign.AccountID WHERE (Account.EmailAddress = @EmailAddress)">
<SelectParameters>
<asp:SessionParameter Name="EmailAddress" SessionField="EmailAddress" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="EmailAddress" />
</UpdateParameters>
</asp:SqlDataSource>
the parameter :
<asp:Parameter Name="EmailAddress" />
is a session parameter.
I am waiting please guide me.
|
|
|
|
|
When you click the Update button, some other command was executed. Since I don't see a statement containing "nvarchar" in the code you have posted, I believe you have hooked up the event handler to somewhere else. You can track down the problem using your debugging environment and pinpoint the problematic statement.
|
|
|
|
|
I don't use Wizards to do my database work. But this parameter isn't supposed to have a data type ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
How to form this logic in a true sql?
Select * from AdCampaign where category and language and keyword in
(select sitecategory, language, keyword from Adzone)
|
|
|
|
|
You can use a join. Use something like this:
select a.* from AdCampaign a inner join Adzone b
on a.category=b.sitecategory and a.language=b.language and a.keyword=b.keyword;
|
|
|
|
|
Could I replaceany of the dqual "=" into "like"?
|
|
|
|
|
You will need to give further details about your requirement. What do you want to achieve with "like"? In SQL "like" matches a pattern, similar to using wild cards. In your case, you seem to mean something else. I may not be able to answer your question, but if you offer more details, somebody else may have an answer.
|
|
|
|
|
I had an error with % at end of query
<pre>select a.AdHeadline,a.AdText,a.DisplayUrl, a.TargetUrl from AdCampaign a inner join Adzone b
on a.sitecategory=b.category and a.language=b.language and a.keyword like %b.keyword%;</pre>
Error:
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'b'.
|
|
|
|
|
make it as
'%'+b.keyword+'%'
|
|
|
|
|
USE pubs<br />
IF EXISTS (SELECT name FROM sysobjects <br />
WHERE name = 'au_info2' AND type = 'P')<br />
DROP PROCEDURE au_info2<br />
GO<br />
USE pubs<br />
GO<br />
CREATE PROCEDURE au_info2<br />
@lastname varchar(30) = 'D%',<br />
@firstname varchar(18) = '%'<br />
AS <br />
SELECT au_lname, au_fname, title, pub_name<br />
FROM authors a INNER JOIN titleauthor ta<br />
ON a.au_id = ta.au_id INNER JOIN titles t<br />
ON t.title_id = ta.title_id INNER JOIN publishers p<br />
ON t.pub_id = p.pub_id<br />
WHERE au_fname LIKE @firstname<br />
AND au_lname LIKE @lastname
this example was taken from msdn like examples
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|
|
Hi,
I'm writing an application and I keep receiving an "Invalid Operation Exception" with this message: "Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
I created a DataSource using the "Add New Data Source" option from Visual Studio 2010 and dragged the controls onto the form. The dataset is set to detail instead of datagrid.
Showing at the bottom of the form I have a ktReunionDataset, reunionBindingSource, reunionTableAdapter, tableAdapterManager.
This table was originally created from a MS-Access database and then was cloned using Visual Studio. I assigned a primary key to the "ID" field through the Server Explorer via the Open Table Definition, then right clicking on the ID field and assigning it the Primary Key. The ID field shows a key icon indicating it's the Primary Key.
The code for the Save button off the navigator looks like this:
private void reunionBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.reunionBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.kTReunionDataSet);
}
Do I need to manually code an update for when the user presses the save button, and iterating through each entry? I have looked at other examples and it doesn't have an update attached to the Data Adapter only Fill and FillByxxx so I'm not sure I need to add something here? Any help is appreciated.
Thank you,
Glenn
|
|
|
|
|
have you tested your update SQL statement on the database? if so does that give an error?
Marc Clifton wrote: That has nothing to do with VB. - Oh crap. I just defended VB!
|
|
|
|