473,387 Members | 1,790 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,387 software developers and data experts.

Ado Connection

lee123
556 512MB
Hi there my question has pictures and all and the story is i have done this code before and it worked in my last project but i have made a different one a couple of days ago and the code i used is not working so if one of you moderators could look at this and tell me why i would appreciate it. so if you could go to my web page and look at it that would be cool

here

lee123
Nov 25 '08 #1
11 1504
Dököll
2,364 Expert 2GB
Hello lee123!

You should keep good copies of your projects... Can you post the code here instead? I worry when I have to go to another site...

Hppe you find what you're looking for:-)

Dököll
Nov 25 '08 #2
lee123
556 512MB
yea i just wanted to show you what i mean because everytime i try to explain it doesn't work out the way i wanted to any way here is the code:

Private Sub DataList1_Click()
Dim strSQL As String
strSQL = "SELECT * FROM TblChildsInfo WHERE childsID =" & "'" & DataList1.BoundText & "'"
Adodc2.RecordSource = strSQL
Adodc2.Refresh
End Sub
Nov 25 '08 #3
Hi there.

Is your childsID an integer? If the answer is yes you should remove the ' from your query and convert your DataList1.BoundText to integer.

If this is not the case, please tell me what kind of error message are you having.

Hope this help you

Rpicilli
Nov 25 '08 #4
lee123
556 512MB
well i have posted the code and pictures on my web page and it shows you what error i am getting. because that's the only way i could show anybody whats going on. (It's a new web page i haven't even got anything on it yet but the problem i am having with this project)

lee123
Nov 25 '08 #5
debasisdas
8,127 Expert 4TB
Lee ,

what do you expect that piece of code to do ?
what is that doing now ?
Nov 25 '08 #6
lee123
556 512MB
well i have a datalist box that is filled with names and when i click on a name i want to display Information. in a datagrid by child id but when i click on the name in the datalist it gives me an error, thats why i wanted someone to look at the pictures on the web page because it explains it all...

lee123
Nov 25 '08 #7
Hi Lee,

Could you please debug your program, stop on the line just after the strSQL = ...

See what is in strSQL. Is the Datalist1.BoundText a string? or a object? You could try to add the .ToString at the BoundText and see what happen.

Rpicilli
Nov 26 '08 #8
lee123
556 512MB
do you mean ToString datagrid1.boundtext if not explain because i'm not good with SQL Still learning As I Go

lee123
Nov 26 '08 #9
No, datgrid1.boudtext.tostring

Try this. But before, try to debug and see what is inside the variable strSQL. If possible cut and paste the content to this forum.

Rpicilli
Nov 27 '08 #10
QVeen72
1,445 Expert 1GB
Hi,

What Item is Selected in The DataList1...?
I Guess, you are getting Error because, Your Child ID's, have
Special Characters in them like single/double quote or * or % or square bracket..
For Single Quote, Replace with double single quote.. and your query will work

Regards
Veena
Nov 27 '08 #11
@rpicilli
Another issue that may be occur is if the datagrid1.boundtext was more then one word you should put inside brackets [ my multiple word ]. As I saw that you are using string as your ID may be the case.
Nov 28 '08 #12

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

Similar topics

3
by: G-Fit | last post by:
Hello group, I have several servers hosting SQL databases. On each of them, I have several databases. All those databases have the same structure (even those on different servers), only the data...
11
by: pradeep_TP | last post by:
Hi all, I have a few questions that I have been wanting to ask for long. These are all related to ADO.net and specifically to conenction to database. 1) If I have opened a connection to a...
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...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
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...
3
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable...
6
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql...
0
by: Robert Avery | last post by:
In VBA/VB6, I had a class (incomplete sample below) that watched and displayed for the user all connection events, so that I could easily see what SQL was taking a long time, and when it freezes, I...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.