Click here to Skip to main content
15,914,397 members
Home / Discussions / C#
   

C#

 
QuestionSQL image to pdf in c# Pin
Saamir20-Jan-09 5:50
Saamir20-Jan-09 5:50 
AnswerRe: SQL image to pdf in c# Pin
Dave Kreskowiak20-Jan-09 6:31
mveDave Kreskowiak20-Jan-09 6:31 
GeneralRe: SQL image to pdf in c# Pin
Saamir21-Jan-09 3:39
Saamir21-Jan-09 3:39 
GeneralRe: SQL image to pdf in c# Pin
Dave Kreskowiak21-Jan-09 12:11
mveDave Kreskowiak21-Jan-09 12:11 
AnswerRe: SQL image to pdf in c# Pin
Giorgi Dalakishvili20-Jan-09 6:41
mentorGiorgi Dalakishvili20-Jan-09 6:41 
GeneralRe: SQL image to pdf in c# Pin
Saamir21-Jan-09 3:38
Saamir21-Jan-09 3:38 
GeneralRe: SQL image to pdf in c# Pin
Giorgi Dalakishvili21-Jan-09 4:48
mentorGiorgi Dalakishvili21-Jan-09 4:48 
Question[newbie] generating a new GUID Pin
jon-8020-Jan-09 5:41
professionaljon-8020-Jan-09 5:41 
I'm trying to generate a new GUID in order to pass it as a value to a SQL Server 2005 db, however it is not working.

Confused | :confused:

//Insert to database and display task reference
            try
            {
                conAppDB.Open();
                string _createNewTaskQuery = (@"INSERT INTO [teamwiki].[dbo].[task]
                                        ([task_ref
                                       VALUES  @task_ref);

                string _newGUID = Guid.NewGuid().ToString();

                SqlCommand cmdCreateNewTaskQuery = new SqlCommand(_createNewTaskQuery, conAppDB);

cmdCreateNewTaskQuery.Parameters.AddWithValue("@task_ref", _newGUID);

                cmdCreateNewTaskQuery.ExecuteNonQuery();

            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally {
                conAppDB.Close();
            }


Error:
System.Data.SqlClient.SqlException was unhandled by user code
Message="Incorrect syntax near '@task_ref'."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=15
LineNumber=19
Number=102
Procedure=""
Server="JCAMILLERI\\SQLEXPRESS"
State=1
StackTrace:
at TaskEntry.btnMultifunction_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\TaskEntry\TaskEntry.aspx.cs:line 108
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Jon

AnswerRe: [newbie] generating a new GUID Pin
musefan20-Jan-09 5:49
musefan20-Jan-09 5:49 
AnswerRe: [newbie] generating a new GUID Pin
Ennis Ray Lynch, Jr.20-Jan-09 9:56
Ennis Ray Lynch, Jr.20-Jan-09 9:56 
GeneralRe: [newbie] generating a new GUID Pin
jon-8020-Jan-09 10:05
professionaljon-8020-Jan-09 10:05 
GeneralRe: [newbie] generating a new GUID Pin
Guffa20-Jan-09 11:06
Guffa20-Jan-09 11:06 
GeneralRe: [newbie] generating a new GUID Pin
PIEBALDconsult21-Jan-09 5:51
mvePIEBALDconsult21-Jan-09 5:51 
QuestionIConfigurationSectionHandler Pin
Patrick Skelton20-Jan-09 5:22
Patrick Skelton20-Jan-09 5:22 
AnswerRe: IConfigurationSectionHandler Pin
J4amieC20-Jan-09 5:29
J4amieC20-Jan-09 5:29 
GeneralRe: IConfigurationSectionHandler Pin
Patrick Skelton20-Jan-09 5:59
Patrick Skelton20-Jan-09 5:59 
QuestionReading Data from XML String using XmlDocument [modified] Pin
jl60420-Jan-09 5:17
jl60420-Jan-09 5:17 
QuestionLost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak20-Jan-09 4:56
ortaparmak20-Jan-09 4:56 
AnswerRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak20-Jan-09 5:00
ortaparmak20-Jan-09 5:00 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
moon_stick20-Jan-09 5:08
moon_stick20-Jan-09 5:08 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak20-Jan-09 5:21
ortaparmak20-Jan-09 5:21 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
moon_stick20-Jan-09 5:28
moon_stick20-Jan-09 5:28 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak20-Jan-09 5:42
ortaparmak20-Jan-09 5:42 
GeneralRe: Lost cs Files in ASP.NET Website.... Now I need to make additions. Pin
ortaparmak21-Jan-09 10:29
ortaparmak21-Jan-09 10:29 
QuestionValidating a "Text" file Pin
dwolver20-Jan-09 4:14
dwolver20-Jan-09 4:14 

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.