Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VB.NET And Interbase Problems


Im doing a project in VB.NET using an INTERBASE database..I'm able to show the info in the DB using the following code : Dim cN As New ADODB.Connection() Dim rS As New ADODB.Recordset() cN.ConnectionString = "provider=LCPI.IBProvider;data source=localhost:" & _ "C:DINEM.gdb;ctype=" & _ "win1251;user id=SYSDBA;password=masterkey" cN.Open() rS.ActiveConnection = cN cN.BeginTrans() rS.Open("SELECT * FROM CUSTOMERS", cN, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockOptimistic) rS.MoveFirst() My problem is when I try to update, delete or add - I get the following error message :Additional information: Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.I have changed the locktype to pessimistic (and the other options) - still no go...Any help will be appreciated! BTW the provider I use (IBProvider) is freeware - the commercial one is $150... I looked in the help/readme but couldnt find anything that states the with the Free version you cannot update/add/delete... Maybe thats the problem???




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
VB And Interbase....
Hey guys!

Anyone knows what should I do to connect Visual basic to an Interbase database? I just know how to connect to access.. =-(


Thanks guys!

Elminster

Please Help With Vb && Interbase
Did anybody have some code shippet about visual basic and Interbase? I know how to connect with database, but I have big problems with stored procedures with output parameters. Any links or code snippets will be a great help.

regards

InterBase 5.5
Can Any body help me on InterBase Problems.. I have used this DataBase for More than 10 Clients and its creating problem.

AITG

Interbase Decent ADO
hi

the past month every now and then i have asked about interbase. and from viewing some of the threads i noticed there is not a lot of people that works with inter base. i would like to know if anyone has got a decent, not full of crap, not full of bugs ADO provider for interbase and that is FREE(why free, because the South African RAND is not a strong currency and my salary does not provide sufficient funds to by a $30 provider) or if anyone can give me tips on how to write my own ADO.

Interbase 2 Things
Can anyone tell me where could i download an ODBC to connect a VB app to interbase?

I had tried everything SEARCH on the web
I am have interbase 6.0 but if i can download 6.5 you can tell me where

How Can I Connect With InterBase 6 Using ADO?
Hi Friends,

How can I establish a connection with Borland InterBase 6 by using ADO and where can I download Interbase 6 ODBC driver?

Thanks for any help,
Fernando.

How To Connect Vb To Interbase?
hello
 can anyone help me..

i dont know vb yet but its my project to do so..

how can i connect vb to interbase to get the data from the interbase?


r3sann

How To Connect To Interbase Database?
How do I connect to a interbase database (*.gdb) under VB environment? Can I use control like data grid, data combo, ado control to manipulate this database? Please help. Thank you.

Interbase Stored Procedures
I have been trying very hard the past couple of weeks to determine the absolute fastest way to insert new records into an Interbase table via Visual Basic and an OLE DB Provider. What I have been able to research so far is that a stored procedure is by far the fastest way to do this. I am setting up the command object and parameters and then attempting to execute the procedure. What I get is:

SQLCode: -92
IBErrorCode: 335544569
Unsuccessfull execution caused by a system error that precludes successfull execution of subsequent statements
Dynamic SQL Error
Parameter mismatch for procedure LOCALDNC_INSERT

The procedure itself is fully tested on Interbase and works. If it is run by SQL, it also runs fine ("EXECUTE PROCEDURE LOCALDNC_INSERT()").

So I know that the procedure itself is fine, its just the ADO command is unable to process it correctly.

I really need to figure this out. If i cannot execute a store procedure than I am really in trouble since performance is not going to meet the project demands at all. Any help is greatly appreciated!

The code i am using is:

Code:
Dim tmpRec As ADODB.Recordset
Dim tmpCom As ADODB.Command
Dim tmpCon As ADODB.Connection
Dim i As Integer
Dim tPhone As Double
Dim tState As String
Dim tFileName As String
Dim tCDate As String
Dim rCount As Long
Dim tCount As Long
Dim tmpStr As String

rCount = 0
tCount = 0

Set tmpCon = New ADODB.Connection


tmpCon.ConnectionString = CurrentProject.Connection.ConnectionString
tmpCon.Open

Set tmpRec = New ADODB.Recordset
If tmpRec.State <> adStateClosed Then tmpRec.Close
tmpRec.Open "SELECT * FROM DNC", tmpCon.ConnectionString, adOpenForwardOnly, adLockReadOnly

If tmpCon.State <> adStateClosed Then tmpCon.Close
tmpCon.ConnectionString = "Provider=SIBPROvider.2;Password=********;Data Source=xxx.xxx.xxx.xxx:E:xxxxxxxxxxxx.GDB;Persist Security Info=True"
tmpCon.Open
Set tmpCom = New ADODB.Command
tmpCom.ActiveConnection = tmpCon.ConnectionString
tmpCom.CommandType = adCmdStoredProc
tmpCom.CommandText = "LOCALDNC_INSERT"
tmpCom.Prepared = True

Do While Not tmpRec.EOF
tPhone = tmpRec.Fields("PHONE").Value
tState = tmpRec.Fields("STATE").Value
tFileName = tmpRec.Fields("FILENAME").Value
tCDate = Format$(tmpRec.Fields("CDATE").Value, "MM/DD/YYYY")
tmpCom.Parameters("PHONE").Value = tPhone
tmpCom.Parameters("ST").Value = tState
tmpCom.Parameters("FILENAME").Value = tFileName
tmpCom.Parameters("CDATE").Value = tCDate
tmpCom.Parameters("DURATION").Value = "6"
For i = 1 To 7
If tmpRec.Fields("DNC" & CStr(i)).Value = "" Then
Exit For
Else
tmpCom.Parameters("FLAG").Value = tmpRec.Fields("DNC" & CStr(i)).Value
tmpCom.Execute , , adExecuteNoRecords + adCmdStoredProc
tCount = tCount + 1
End If
Next i
tmpRec.MoveNext
rCount = rCount + 1
If rCount Mod 100 = 0 Then
Me.Caption = rCount & " Records Processed : " & tCount & " Transactions Processed"
Me.Refresh
End If
Loop

tmpCon.Close

Set tmpRec = Nothing
Set tmpCom = Nothing
Set tmpCon = Nothing

Need To Connect To Interbase Database?
Hi There,
How can i connect to interbase database with code?
I tried this;

Dim cnn As New ADODB.Connection

path= "D:YNPALLOZTAY_DATA_270406pdks.gdb"
Adodc1.ConnectionString=path
cnn.ConnectionString = Adodc1.ConnectionString
cnn.Open , "SYSDBA", "masterkey"

but it doesnt work.There is an error.
Please help me



Visual Basic + Interbase : Addnew Error
I am using Visual Basic to connect to Interbase. The connection worked but when I try adding a new record
the following error occurs :

    Runtime Error '3251':
    Object or provider is not capable of performing requested operation.

This is the Visual Basic code I'm using

'Setting & opening the connection

Dim adoConn As New ADODB.Connection

 Set adoConn = New ADODB.Connection
 adoConn.ConnectionString = "provider=IbOLEdb.1;data     source=localhost:C:Program FilesBorlandInterBase
IB_TutorialTutorial.gdb;ctype=win1251;user id=SYSDBA;password=masterkey"
 adoConn.Open

Private Sub TEST()
Dim RS As New ADODB.Recordset, SqlStr as string
 
  SqlStr = "SELECT * FROM Country"
  RS.CursorLocation = adUseClient
  Set RS = New ADODB.Recordset
  RS.Open SqlStr, adoConn, adOpenStatic,
adLockBatchOptimistic
 
  With RS
    .AddNew  ****** ERROR **********
    ![country] = "Malta"
    ![Currency] = "Lm"
    .Update
    .Close
  End With
    Set RS = nothing
 End Sub

I would appreciate any help !!

Thanks



OLEDB/ADO/Interbase Problems With Visual Basic 6.
Anyone here who can explain me how to successfully use Interbase with IBOLEDB (www.oledb.net) in Visual Basic/ADO environment?

I can read records, but when I try to edit them I always get:
"insufficient base table information for updating and refreshing"

I think the problem is maybe in automatic assignment of primary key... but.. that should be only in the case of adding, I get this error on update too..

And some people said I should use db.CursorLocation = adUseClient
why is that? ... too much questions, ... )

pyc

Please Help Me . Problem:-Getting Data From Interbase Using Access Database Dynamically
Hello,
I am using Visual Basic6.0 as frontend,MS Access 2000 and Interbase as Backend and Crystal Reports as reporting tool.For reporting purpose I have written pass-thru queries in Access to get the data residing in Interbase.How can I change the odbc connect str property of the pass-thru query programmatically so that i can pass the username and password to the query during program execution.
The requirement is very urgent.Please give me a feasible solution as soon as possible
Thank You
Nivedita

Copyright 2005-08 www.BigResource.com, All rights reserved