Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sendoh
Starting Member
12 Posts |
Posted - 2005-07-02 : 02:16:27
|
hi all!what's wrong with this,visualbasic link in MSaccess>>>>>>>>>dim r as adodb.recordsetdim c as adodb.connectionprivate sub_command()r.open "select*from table1 where name = '"& text1.text &"'",c,adopendynamicr.openthere's an error on my sql,please help medeep |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-02 : 02:24:41
|
You did not connect to your database using connection string cMadhivananFailing to plan is Planning to fail |
 |
|
sendoh
Starting Member
12 Posts |
Posted - 2005-07-04 : 06:28:37
|
why?but i've been always use this variable for my connection string!!!please any brighter idea??????????????please help me!!!!!deep |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-04 : 06:30:21
|
Post your connecting string and where did you declare that?MadhivananFailing to plan is Planning to fail |
 |
|
sendoh
Starting Member
12 Posts |
Posted - 2005-07-04 : 07:13:38
|
dim c as adodb.connection dim r as adodb.recordsetprivate sub cmd1_click()set c = new adodb.connectionc.connectionstring = "provider blah blah"c.openset r =new adodb.recordsetr.open " SELECT * FROM table1 where name ='" & text1.text &"'", c, adopendynamicr.openif r.BOF and r.EOF thenmsgbox "not found",search"end ifr.("fieldname") = text1.textend subthis is my errorruntime error '3709'the connection cannot be used to performed this operation.it's either closed or invalid in this context.hope so!!!!!!deep |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-07-04 : 07:19:09
|
Try one of theser.open " SELECT * FROM table1 where name ='" & text1.text &"'", c, adopendynamic, adLockOptimisticorSet r =c.Execute("SELECT * FROM table1 where name ='" & text1.text &"'")MadhivananFailing to plan is Planning to fail |
 |
|
Hyukevain
Yak Posting Veteran
66 Posts |
Posted - 2005-07-05 : 07:08:11
|
1. Try Case Sensitive Connection String. Use ADODC to help you generate the Connection String and don't forget to check "Allow save password" so the connection string will include your password.2. Try to use Client base recordset (rs.CursorLocation = adUseClient)3. Try to open the recordset by using the connectionString, not the adodb.connection object (rs.open "bla bla", "provider blah blah", adOpenStatic, adLockReadOnlyHope this can help. |
 |
|
sendoh
Starting Member
12 Posts |
Posted - 2005-07-06 : 02:43:14
|
thanks....deep |
 |
|
|
|
|
|
|