Search results for query: *

  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?
  16. C

    Simple SQL connection query

    I have managed to capture the DelID field being passed into the page, and I want to query the table to get a field called delnotenumber. Later I want to use the delnotenumber to write to a new table, but at this stage I am purely trying to retrieve it from the db and display in in screen.
  17. C

    Simple SQL connection query

    I am very new to programming. Moreover, I only started this morning! I am trying to query an SQL database to return the delnotenumber field, but I don't seem to be having much joy. Where am I going wong? I am not sure if the cmdstring is correct, nor if I am binding the results correctly to...
Back
Top