Click here to Skip to main content
16,007,111 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: vb.net Shell() successful? Pin
rwestgraham11-Aug-05 8:08
rwestgraham11-Aug-05 8:08 
GeneralRe: vb.net Shell() successful? RESOLVED Pin
partt11-Aug-05 8:29
partt11-Aug-05 8:29 
QuestionXmlTextReader ignores the 'encoding=...' definition? Pin
Thomas Schittli11-Aug-05 5:16
Thomas Schittli11-Aug-05 5:16 
GeneralActiveX Control - Knowing when it's fully Init()ed Pin
mankeyrabbit10-Aug-05 12:16
mankeyrabbit10-Aug-05 12:16 
GeneralError deploying dll Pin
Ajay L S9-Aug-05 21:50
Ajay L S9-Aug-05 21:50 
GeneralCLR Allocation & De - Allocation Pin
mohsin_m9-Aug-05 21:40
mohsin_m9-Aug-05 21:40 
GeneralRe: CLR Allocation & De - Allocation Pin
Ali Sajadian10-Aug-05 1:15
Ali Sajadian10-Aug-05 1:15 
GeneralCalling Search Store Proc have problem Pin
Ali Sajadian9-Aug-05 20:29
Ali Sajadian9-Aug-05 20:29 
Hi everybody I hope somebody can find a suggestion for this problem
I wrote store proc that work correctly in QueryAnalyzer but when I
call it from my project it make error "system error"
look at it:

CREATE PROCEDURE spSer_contact
@contactGroupID uniqueidentifier,
@countryID uniqueidentifier,
@contactName varchar(100),
@city varchar(50),
@phoneNumber varchar(100)
AS
declare @SqlString varchar(2000)
set @SqlString = 'SELECT contact.contactName,
contactgroup.contactGroupName,
country.countryName, contact.city,
contact.street, contact.zipCode,
contact.phoneNumber, contact.faxNumber,
contact.telex, contact.email,
contact.webSite, contact.comments,
contact.attachment,contact.contactID,
contact.contactGroupID, contact.countryID
FROM contact INNER JOIN contactgroup
ON contact.contactGroupID = contactgroup.contactGroupID
INNER JOIN country
ON contact.countryID = country.countryID
WHERE'

if (len(cast(@contactGroupID as varchar(38))) != 0)
set @SqlString=@SqlString+' contact.contactGroupID='''+cast (@contactGroupID as varchar(38))+''''
if (len(cast(@countryID as varchar(38))) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString = @SqlString + ' contact.countryID = '''+cast(@countryID as varchar(38))+''''
else
set @SqlString = @SqlString + ' and contact.countryID = '''+cast(@countryID as varchar(38))+''''
if (len(@contactName) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString=@SqlString+' dbo.contact.contactName='''+ @contactName+''''
else
set @SqlString=@SqlString+' and dbo.contact.countryID= '''+ @contactName+''''
if (len(@city) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString = @SqlString + ' dbo.contact.city = '''+@city+''''
else
set @SqlString = @SqlString + ' and dbo.contact.city = '''+@city+''''
if (len(@phoneNumber) != 0)
if (SubString(@SqlString, len(@SqlString) - 4, 5) = 'where')
set @SqlString=@SqlString+' dbo.contact.phoneNumber= '''+ @phoneNumber+''''
else
set @SqlString=@SqlString+' and dbo.contact.phoneNumber= '''+ @phoneNumber+''''

exec (@SqlString)
GO

====================
//sample code for retriving data by store proc
SqlConnection cn = new SqlConnection(connectionString);
SqlCommand cm = new SqlCommand("[spSer_contact]",cn);
cm.CommandType = CommandType.StoredProcedure;
SqlParameter pm = new SqlParameter("@contactGroupID",SqlDbType.UniqueIdentifier,16,"contactGroupID");
pm.Value = listBox1.SelectedValue;
cm.Parameters.Add(pm);
SqlDataAdapter da = new SqlDataAdapter(cm);
DataSet ds = new DataSet();
da.Fill(ds,"contact");//this have problem error message is (system error)
dataGrid1.DataSource = ds.Tables["contact"];


if somebody find a solution for this problem please send it
thanx Sniff | :^)
GeneralExporting native .Net Data types Pin
mohsin_m8-Aug-05 20:43
mohsin_m8-Aug-05 20:43 
GeneralRe: Exporting native .Net Data types Pin
J4amieC9-Aug-05 1:35
J4amieC9-Aug-05 1:35 
GeneralExporting .Net Data types Pin
mohsin_m8-Aug-05 20:41
mohsin_m8-Aug-05 20:41 
GeneralRe: Exporting .Net Data types Pin
Vasudevan Deepak Kumar8-Aug-05 20:59
Vasudevan Deepak Kumar8-Aug-05 20:59 
GeneralPassing String from DLL to C# Pin
mohsin_m8-Aug-05 20:28
mohsin_m8-Aug-05 20:28 
GeneralRe: Passing String from DLL to C# Pin
Christian Graus11-Aug-05 14:39
protectorChristian Graus11-Aug-05 14:39 
GeneralCalling C++ code from C# Pin
mohsin_m8-Aug-05 20:16
mohsin_m8-Aug-05 20:16 
GeneralRe: Calling C++ code from C# Pin
Mohamad Al Husseiny9-Aug-05 14:00
Mohamad Al Husseiny9-Aug-05 14:00 
GeneralRe: Calling C++ code from C# Pin
Wej Parry15-Aug-05 15:28
Wej Parry15-Aug-05 15:28 
GeneralRe: Calling C++ code from C# Pin
Mohamad Al Husseiny15-Aug-05 16:18
Mohamad Al Husseiny15-Aug-05 16:18 
GeneralRe: Calling C++ code from C# Pin
Wej Parry16-Aug-05 0:09
Wej Parry16-Aug-05 0:09 
Generalcsc problem Pin
Heinz_8-Aug-05 20:11
Heinz_8-Aug-05 20:11 
GeneralRe: csc problem Pin
[Marc]9-Aug-05 0:02
[Marc]9-Aug-05 0:02 
GeneralDatagrid Help!!! Need to make client side method! Pin
dgap8-Aug-05 20:01
dgap8-Aug-05 20:01 
GeneralProject management Pin
8-Aug-05 13:18
suss8-Aug-05 13:18 
GeneralRe: Project management Pin
Tad McClellan8-Aug-05 13:26
professionalTad McClellan8-Aug-05 13:26 
GeneralRe: Project management Pin
kc_tri8-Aug-05 13:31
kc_tri8-Aug-05 13:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.