Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. whats wrong wif my connection?

whats wrong wif my connection?

Scheduled Pinned Locked Moved Visual Basic
helpdatabasequestion
22 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P pandapatin

    there is an error: Unrecognized attribute 'keyword'. Note that attribute names are case-sensitive. the code is: add keyword="name=psmConnectionString2" keyword1="connectionString=Data Source=HAPPYFAM-B614E1\SQLEXPRESS;Initial Catalog=psm;Integrated Security=True" providerName="System.Data.SqlClient" -- modified at 4:06 Wednesday 1st March, 2006

    G Offline
    G Offline
    Guffa
    wrote on last edited by
    #21

    The attribute names in the tag shold be "key" and "value", not "keyword", "keyword1" and "providerName". Remove "connectionString=" from your connection string. Remove the providerName attribute. --- b { font-weight: normal; }

    1 Reply Last reply
    0
    • P pandapatin

      the error is : Keyword not supported: 'happyfam-b614e1\sqlexpress;initial catalog'. it return nuthing to the connection.the code us : Dim MyConn As New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString2")) Dim MyCmd As New SqlCommand("sp_ValidateUser", MyConn) MyCmd.CommandType = CommandType.StoredProcedure Dim objParam1, objParam2 As SqlParameter objParam1 = MyCmd.Parameters.Add("@noPekerja", SqlDbType.VarChar) objParam2 = MyCmd.Parameters.Add("@pWord", SqlDbType.VarChar) objParam1.Direction = ParameterDirection.Input objParam2.Direction = ParameterDirection.Input objParam1.Value = textUsername.Text objParam2.Value = passwordTextBox.Text Try If MyConn.State = ConnectionState.Closed Then MyConn.Open() End If Dim objReader As Data.SqlClient.SqlDataReader objReader = MyCmd.ExecuteReader(CommandBehavior.CloseConnection) Catch ex As Exception lblMessage.Text = "Error Connecting to Database!" End Try please help me?

      J Offline
      J Offline
      Jai Mataji
      wrote on last edited by
      #22

      pandapatin wrote:

      Dim MyConn As New SqlConnection(ConfigurationManager.AppSettings("psmConnectionString2"))

      Can you paste the value for the key psmConnectionString2 in Web.config to obtain better picture. Sneha

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups