Invalid delimiter ; found in connection option: server.;database 
Author Message
 Invalid delimiter ; found in connection option: server.;database

What is a delimiter? I get this error when trying to update database info.
I've checked over my code and can find nothing wrong myself.

From newmember.aspx:
Source Error:

Line 32:     Private Sub btnSaveSale_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles btnSaveSale.Click
Line 33:         'Setup the Connection
Line 34:         Dim objConnection As New SqlClient.SqlConnection _
Line 35:             ("server.;database=KeepFit;trusted_connection=true")
Line 36:         'Create the final SQL string to execute

Source File: d:\inetpub\wwwroot\newsale\newmember.aspx.vb    Line: 34

Stack Trace:
[ArgumentException: Invalid delimiter ; found in connection option:
server.;database.]
   System.Data.SqlClient.ConStringUtil.ParseStringIntoHashtable(String
conString, Hashtable values)
   System.Data.SqlClient.ConStringUtil.ParseConnectionString(String
connectionString)
   System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
   System.Data.SqlClient.SqlConnection..ctor(String connectionString)
   newsale.WebForm1.btnSaveSale_Click(Object sender, EventArgs e) in
d:\inetpub\wwwroot\newsale\newmember.aspx.vb:34
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()

Here is the code:     **** Offending Line

Private Sub btnSaveSale_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSaveSale.Click
        'Setup the Connection
**** Dim objConnection As New SqlClient.SqlConnection _
            ("server.;database=KeepFit;trusted_connection=true")
        'Create the final SQL string to execute
        'remembering that only text strings are
        'enclosed in 'apostrophes'
        Dim strSQL As String
        strSQL = "INSERT INTO sales(memberid, description, charge) " & _
            "VALUES('" & txtMemberID.Text & "'; '" & _
            txtDescription.Text & "', " & txtCharge.Text & ")"

        'Create our command object
        Dim objCommand As New SqlClient.SqlCommand(strSQL, objConnection)
        ' Open the connection, execute the command, close the connection.
        objConnection.Open()
        objCommand.ExecuteNonQuery()
        objConnection.Close()
        'Take the user back to the front page
        Response.Redirect("default.apsx")

    End Sub

Please someone help me out. I've posted before with no reponse.



Fri, 28 Jan 2005 07:04:52 GMT  
 Invalid delimiter ; found in connection option: server.;database

Quote:
> What is a delimiter? I get this error when trying to update database info.
> I've checked over my code and can find nothing wrong myself.

http://www.m-w.com/cgi-bin/dictionary?va=delimiter


Fri, 28 Jan 2005 11:13:34 GMT  
 Invalid delimiter ; found in connection option: server.;database
The connectionstring for your objConnection needs to have a servername
eg ("server=<YourServerName>;database=KeepFit;trusted_connection=true")


Quote:
> What is a delimiter? I get this error when trying to update database info.
> I've checked over my code and can find nothing wrong myself.

> From newmember.aspx:
> Source Error:

> Line 32:     Private Sub btnSaveSale_Click(ByVal sender As System.Object,
> ByVal e As System.EventArgs) Handles btnSaveSale.Click
> Line 33:         'Setup the Connection
> Line 34:         Dim objConnection As New SqlClient.SqlConnection _
> Line 35:             ("server.;database=KeepFit;trusted_connection=true")
> Line 36:         'Create the final SQL string to execute

> Source File: d:\inetpub\wwwroot\newsale\newmember.aspx.vb    Line: 34

> Stack Trace:
> [ArgumentException: Invalid delimiter ; found in connection option:
> server.;database.]
>    System.Data.SqlClient.ConStringUtil.ParseStringIntoHashtable(String
> conString, Hashtable values)
>    System.Data.SqlClient.ConStringUtil.ParseConnectionString(String
> connectionString)
>    System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
>    System.Data.SqlClient.SqlConnection..ctor(String connectionString)
>    newsale.WebForm1.btnSaveSale_Click(Object sender, EventArgs e) in
> d:\inetpub\wwwroot\newsale\newmember.aspx.vb:34
>    System.Web.UI.WebControls.Button.OnClick(EventArgs e)

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo

- Show quoted text -

Quote:
> stBackEvent(String eventArgument)
>    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument)
>    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
>    System.Web.UI.Page.ProcessRequestMain()

> Here is the code:     **** Offending Line

> Private Sub btnSaveSale_Click(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles btnSaveSale.Click
>         'Setup the Connection
> **** Dim objConnection As New SqlClient.SqlConnection _
>             ("server.;database=KeepFit;trusted_connection=true")
>         'Create the final SQL string to execute
>         'remembering that only text strings are
>         'enclosed in 'apostrophes'
>         Dim strSQL As String
>         strSQL = "INSERT INTO sales(memberid, description, charge) " & _
>             "VALUES('" & txtMemberID.Text & "'; '" & _
>             txtDescription.Text & "', " & txtCharge.Text & ")"

>         'Create our command object
>         Dim objCommand As New SqlClient.SqlCommand(strSQL, objConnection)
>         ' Open the connection, execute the command, close the connection.
>         objConnection.Open()
>         objCommand.ExecuteNonQuery()
>         objConnection.Close()
>         'Take the user back to the front page
>         Response.Redirect("default.apsx")

>     End Sub

> Please someone help me out. I've posted before with no reponse.



Fri, 28 Jan 2005 11:44:10 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Multiple Winsock-Connections to a server AND Winsock-Connection to a server minimized in systray

2. VB/ODBC/SQL Server delimiters

3. ; delimiter in database table

4. DAO database connection to SQL Server

5. Connection problems to SQL server database

6. Connection to an access database on LAN server

7. Database connection with SQL server

8. OLE Data for Database Connection but need to change server name frequently

9. Active X Document / SQL Server Database Connection

10. Invalid Export Options error when exporting a crystal report

11. Client and Server Database Connection

12. Connection String to Access Database on Web Server from VB

 

 
Powered by phpBB® Forum Software