473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

connection problem

140 100+
runtime error is coming while iam trying to save my file

[DBNETlib]connection open(parse connect params()].invalid connection.

Private Sub SaveApp()
On Error Resume Next
With RS

'Add new Record
.AddNew

' Application Name
.Fields(0).Value = projectid.Text

' Description
If project_Txt.Text <> "" Then
.Fields(1).Value = project_Txt.Text
End If

' File Title
If date_txt.Text <> "" Then
.Fields(2).Value = date_txt.Text
End If

' Arguments
If episodetxt.Text <> "" Then
.Fields(3).Value = episodetxt.Text
End If

If seq_txt.Text <> "" Then
.Fields(4).Value = seq_txt.Text
End If

If scene_txt.Text <> "" Then
.Fields(5).Value = scene_txt.Text
End If

If shot_txt.Text <> "" Then
.Fields(6).Value = shot_txt.Text
End If

If shot_image.Text <> "" Then
.Fields(7).Value = shot_image.Text
End If

If action_txt.Text <> "" Then
.Fields(8).Value = action_txt.Text
End If
If dialogue_txt.Text <> "" Then
.Fields(9).Value = dialogue_txt.Text
End If

If slug_txt.Text <> "" Then
.Fields(10).Value = slug_txt.Text
End If
If camera_txt.Text <> "" Then
.Fields(11).Value = camera_txt.Text
End If



'update recordset
.Update


End With
End Sub

Private Sub Savefile_Click()

CN.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=admin;Data Source=E:\Vb_image\Storyboard\storyboard.mdb"


Set CN = New ADODB.Connection
Set RS = New ADODB.Recordset
CN.CursorLocation = adUseServer
CN.Open "storyboard.mdb"
Dim strmsacc As String
strmsacc = "SELECT * FROM story where projectId = '9999'"
RS.Open strmsacc, CN, adOpenForwardOnly, adLockOptimistic

RS.AddNew
SaveApp
RS.Update
Set RS = Nothing
Set RS = New Recordset
RS.Close
CN.Close

MsgBox "save Finished !!!", vbInformation
projectid.Text = ""
project_Txt.Text = ""
date_txt.Text = ""
episodetxt.Text = ""
seq_txt.Text = ""
scene_txt.Text = ""
shot_txt.Text = ""
shot_image.Text = ""
action_txt.Text = ""
dialogue_txt.Text = ""
slug_txt.Text = ""
camera_txt.Text = ""

End Sub

help me on this. please
Jan 20 '07 #1
1 922
willakawill
1,646 1GB
runtime error is coming while iam trying to save my file

[DBNETlib]connection open(parse connect params()].invalid connection.

Private Sub SaveApp()
On Error Resume Next
With RS

'Add new Record
.AddNew

' Application Name
.Fields(0).Value = projectid.Text

' Description
If project_Txt.Text <> "" Then
.Fields(1).Value = project_Txt.Text
End If

' File Title
If date_txt.Text <> "" Then
.Fields(2).Value = date_txt.Text
End If

' Arguments
If episodetxt.Text <> "" Then
.Fields(3).Value = episodetxt.Text
End If

If seq_txt.Text <> "" Then
.Fields(4).Value = seq_txt.Text
End If

If scene_txt.Text <> "" Then
.Fields(5).Value = scene_txt.Text
End If

If shot_txt.Text <> "" Then
.Fields(6).Value = shot_txt.Text
End If

If shot_image.Text <> "" Then
.Fields(7).Value = shot_image.Text
End If

If action_txt.Text <> "" Then
.Fields(8).Value = action_txt.Text
End If
If dialogue_txt.Text <> "" Then
.Fields(9).Value = dialogue_txt.Text
End If

If slug_txt.Text <> "" Then
.Fields(10).Value = slug_txt.Text
End If
If camera_txt.Text <> "" Then
.Fields(11).Value = camera_txt.Text
End If



'update recordset
.Update


End With
End Sub

Private Sub Savefile_Click()

CN.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=admin;Data Source=E:\Vb_image\Storyboard\storyboard.mdb"


Set CN = New ADODB.Connection
Set RS = New ADODB.Recordset
CN.CursorLocation = adUseServer
CN.Open "storyboard.mdb"
Dim strmsacc As String
strmsacc = "SELECT * FROM story where projectId = '9999'"
RS.Open strmsacc, CN, adOpenForwardOnly, adLockOptimistic

RS.AddNew
SaveApp
RS.Update
Set RS = Nothing
Set RS = New Recordset
RS.Close
CN.Close

MsgBox "save Finished !!!", vbInformation
projectid.Text = ""
project_Txt.Text = ""
date_txt.Text = ""
episodetxt.Text = ""
seq_txt.Text = ""
scene_txt.Text = ""
shot_txt.Text = ""
shot_image.Text = ""
action_txt.Text = ""
dialogue_txt.Text = ""
slug_txt.Text = ""
camera_txt.Text = ""

End Sub

help me on this. please
Hi. You are having quite a few problems with your code I see.
It seems that you have declared RS and CN somewhere not in this code. Please post the code where they are declared
Thanks
Jan 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
4
by: James | last post by:
We've had a recurring problem where all of a sudden we get a DBMSSOCN General Network Error on any page that connects to SQL Server. Then we have to reboot the server and everything works fine...
1
by: Mark | last post by:
I know that DB2 LUW version 8 has "connection pooling" that provides a connection concentrator (limits the number of simultaneous connections that can occur). But does it really provide connection...
35
by: Eric Sabine | last post by:
In my Finally block, I was using cn.close (where cn is an ADO.NET connection object, SQLConnection to be exact) and then I came across the following in some microsoft code. If Not cn Is Nothing...
4
by: Rahul Anand | last post by:
Getting SQL Exception when trying to implement Connection based Trasaction using SQL Helper class. I am using the follwing function to execute my stored procs: -=-=-=- ExecuteScalar(ByVal...
5
by: Suresh | last post by:
Hi Guys I have Db2 server installed on remote server. i am connecting to that remote server by using VPN. I want to connect that remote DB2 server instance using my local machine DB2...
16
by: crbd98 | last post by:
Hello All, Some time ago, I implemented a data access layer that included a simple connectin pool. At the time, I did it all by myself: I created N connections, each connection associated with...
20
by: fniles | last post by:
I am using VS2003 and connecting to MS Access database. When using a connection pooling (every time I open the OLEDBCONNECTION I use the exact matching connection string), 1. how can I know how...
1
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.