Recent content by CookieNZ

  1. C

    Reading multiple fields from database

    I have a simple query that returns the data in a field. selectstring = ("select invoicecompleted from mainjobdetails where jobno='" & jobnumber & "'") cmdselect = New SqlCommand(selectstring, dbconnection) status = cmdselect.ExecuteScalar() I have a simple query that returns the data...
  2. C

    SQL querystring syntax error

    Dim jobnumber As String = Request.QueryString("JobNo") Dim dbquerystring As New OleDbDataAdapter("select * from mainjobdetails where jobno=" & "'jobnumber'", dbconnection) Doesn't seem to load the right data and I am sure I have got the wrong syntax.
  3. C

    Syntax error converting the varchar value to a column of data type int.

    'Define the connection Dim dbconnection As New OleDbConnection("provider=sqloledb;server=(local);database=thardata; uid=sa;pwd=tharSQL") 'Define the querystring Dim dbquerystring As New OleDbDataAdapter("select * from mainjobdetails where jobno=" & Request.QueryString("JobNo"), dbconnection)...
  4. C

    data binding to a label/textbox

    I am very new to programming and I am trying to bind data to a label/textbox rather than a combobox, grid etc... The examples I have seen all embed the code within the <asp:label> e.g. <% connectionsting... %> How do I do it so that it is in same a on_click procedure (this is more logical...
  5. C

    web.config and connections

    I am trying to use a web.config file to set the connection. Dim cs As ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings("publicconnection") Dim cn As New SqlConnection(cs.ConnectionString) Dim myadapter As New SqlDataAdapter("select * from mainjobdetails", cs) Dim...
  6. C

    mailmessage.send

    It now works.M My localhost IIS was using dotnet v1. I switched it to dotnet v2 and all it worked
  7. C

    Dynamically Sending Emails

    It now works.M My localhost IIS was using dotnet v1. I switched it to dotnet v2 and all it worked
  8. C

    Dynamically Sending Emails

    Yes I do (IIS > Default SMTP Virtual Server)
  9. C

    mailmessage.send

    I have SMTP installed, but whether I specify localhost or mail.bizoservices.com, I still get an error in IE
  10. C

    Dynamically Sending Emails

    I am trying to do something similar, but have an issue with the localhost Sub button_click() Dim emailfrom As String = "myaddress@hotmail.com" Dim emailto As String = "myaddress@mosaic.net.nz" Dim emailsubject As String = "Important message" Dim emailbody As String = "Thanks for reading this"...
  11. C

    mailmessage.send

    I have found some source code on the web, but I still get an error in IE Sub button_click(ByVal s As Object, ByVal e As EventArgs) 'create the mail message Dim mail As New MailMessage() 'set the addresses mail.From = New MailAddress("paul_bfc@hotmail.com")...
  12. C

    mailmessage.send

    Cheers. I understand that I need to specify Dim mailmessage As New SmtpClient("smtpserver") but not sure on the syntax of the port etc..... again, I am very new to all this programming stuff
  13. C

    mailmessage.send

    I am new to programming and I am using a book as a tutorial. I am trying to send email using a button click, but I get an error message saying that mailmessage is used before it is assigned a variable. <%@ Import Namespace="System.net.mail" %> <script runat=server> Sub button_click(ByVal s...
  14. C

    Simple SQL connection query

    Thanks for that. I am also struggling with the correct syntax to display the field Is DeliveryNumber.Text = reader.ToString correct?
  15. C

    SMTPClient error from Web Developer Express

    This is my declaration block:- Sub page_load() Dim mailmessage As SmtpClient mailmessage.Send( _ paul.cook@gret.co.nz, _ "Sending Mail!", _ "Hello") End Sub However, Web Developer Express errors saying that mailmessage is used before a value is assigned. Any thoughts?
Top Bottom