Search results for query: *

  • Users: CookieNZ
  • Content: Threads
  • Order by date
  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

    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...
  7. 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?
  8. 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