Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 374 results for
initalize
- Page 1
initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ceyesuma
Hello I am recieving error [icode]java.sql.SQLException: At least one parameter to the current statement is uninitialized.[/icode] at ConnectStudentDAO.java at [icode]ResultSet rs=ps.executeQuery();[/icode] Not sure if the xml statment or the bean variables or if ps.close() is needed [b] output [/b] [code] run: driver tableName from …
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ~s.o.s~
If the query identified by the key 'SelectStudent' has placeholders (? characters), you need to set them before executing the prepared statement.
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ceyesuma
I was afraid of that . so ? is in the statemsnt holding a place to hold the stuUid that I found in user input[icode]loginInfo.getStuUid()[/icode] ..... so that has to equal a variable or the [icode]studentUser.setStuUid(loginIfo.getUser());([/icode] ?
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ~s.o.s~
Use one of the setXXX methods of the PreparedStatement to set the value of your place holder.[code] ps = (PreparedStatement) conn.prepareStatement( ModelUtils.getXMLResource("SelectUserGroup")); ps.setString(1, user.getUserId()); ResultSet rs = ps.executeQuery();[/code]
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ceyesuma
is that ps.setString(int parameterIndex,tring x) not sure what int parameterIndex is though.
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ceyesuma
I still have a '?' so I don't have a clue yet. [code] if (conn != null) { PreparedStatement ps = null; conn = (Connection) ddf.getConnection(); String queryWhere = ("INSERT INTO student(stu_uid) VALUES(?)"); ps = conn.prepareStatement(queryWhere); ps.setString(1,stuUid);…
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ceyesuma
I didn't see your example. I'm still getting nullpointer so I'm still working with it 1. ps = (PreparedStatement) conn.prepareStatement( 2. ModelUtils.getXMLResource("SelectUserGroup")); 3. ps.setString(1, user.getUserId()); 4. ResultSet rs = ps.executeQuery();
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ceyesuma
Hello To make things more complicated I re-routed the code because a prerequisite to find which table to use (student,instructor.etc) I have a Statement: [icode]SELECT groupName FROM ser_group AS ug,usergroup_mapping AS ugm WHERE ugm.uid=? and ugm.groupid=ug.groupid[/icode] Is this the same? just use ps.setString(1,stuUid) before this …
Re: initalize a var for a preparedStatement
Programming
Software Development
13 Years Ago
by ceyesuma
It throws my temp exceptionso I'm not sure if all the tables are getting the correct uid. out of all those ? [code] in LoginInfoBean db sets password in LoginInfoBean: [C@e70e30 LoginInfoBean: sj db sets profile: stu_ all models (Student.java extend LoginInfo.javaall beans extend models in getConnection of DerbyDAOFactory driver …
newbie needs assatance with breaking code into class
Programming
Software Development
15 Years Ago
by shadowfire36
…, int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search within…::string TeamName) { //declare the result array Match SearchResult[2000]; //
initalize
the result counter int SearchResultCount=0; int SelectedNumber; //search within…
error codes with class and structs
Programming
Software Development
15 Years Ago
by shadowfire36
…, int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search within…, int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search within…
Re: error codes with class and structs
Programming
Software Development
15 Years Ago
by shadowfire36
… TeamName, int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search within… TeamName, int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search within…
Help with input from a text file to an array.
Programming
Software Development
12 Years Ago
by rcowboy
… 0 { scoresArray[i] = 0; } for (int i = 0; i <
initalize
; i++) // checks that they are zero via cout. { cout <…; " score: " << scoresArray [
initalize
] << endl; count++; scoresIn >> scoresArray [
initalize
]; } scoresIn.close(); cout << scores…
Re: error codes with class and structs
Programming
Software Development
15 Years Ago
by shadowfire36
… int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search … cerr << " File is Missing"; } //
initalize
the counter int matchesCounter=0; while(!inFile.eof()) { //&Match…
Need help with some syntax errors
Programming
Software Development
18 Years Ago
by rgbivens
… deltat, double amplitude ) int main() //begin main function { int wavesize; //
initalize
wavesize as integer double duration, deltat, amplitude, frequency; // initalized as…= 0; i < wavesize; i++) //loop Waveform [ i ] = 0.0; //
initalize
array to 0 // call function CalcWaveform (Waveform , wavesize, frequency, deltat…
Re: Need help with some syntax errors
Programming
Software Development
18 Years Ago
by WolfPack
… )[COLOR=Red];[/COLOR] int main() //begin main function { int wavesize; //
initalize
wavesize as integer double duration, deltat, amplitude, frequency; // initalized as… = 0; i < wavesize; i++) //loop Waveform [ i ] = 0.0; //
initalize
array to 0 // call function CalcWaveform (Waveform , wavesize, frequency, deltat…
Global Hotkey Problem in C
Programming
Software Development
13 Years Ago
by andrewll2
…keypress with the help of LowLevelKeyboardProc(...) function, finally un-
initalize
it with the UnhookWindowsHookEx(...) function. I read that it…, WPARAM wParam, LPARAM lParam ); HHOOK s; int main() { //
Initalize
the hook s = SetWindowsHookEx(WH_KEYBOARD_LL,LowLevelKeyboardProc,NULL,GetCurrentThreadId()); getchar(); // un…
Re: Help with input from a text file to an array.
Programming
Software Development
12 Years Ago
by sundip
What do you mean by [CODE]scoresIn >> scoresArray [
initalize
];[/CODE]
Re: Help with input from a text file to an array.
Programming
Software Development
12 Years Ago
by rcowboy
… try that and see what happens. scoresIn >> scoresArray [
initalize
]; This was an attempt to just try and shove the…
class struct fix 2 new errors need advice
Programming
Software Development
15 Years Ago
by shadowfire36
… int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search … cerr << " File is Missing"; } //
initalize
the counter int matchesCounter=0; while(!inFile.eof()) { //&Match…
linker error help
Programming
Software Development
15 Years Ago
by shadowfire36
… int record) { //declare the result array Match SearchResult; //
initalize
the result counter int SearchResultCount=0; //int SelectedNumber; //search … cerr << " File is Missing"; } //
initalize
the counter int matchesCounter=0; while(!inFile.eof()) { //&Match…
getch() help
Programming
Software Development
14 Years Ago
by scott6480
…i:\\c++\\register.txt"); //********************************** Function Prototypes void
initalize
(cashregister menu[26], cashregister order[26]); void checkdatafile(); … 0; } // end of main function //********************************** Function Definitions void
initalize
(cashregister menu[26], cashregister order[26]) { int i; for…
passing data from one structure to another
Programming
Software Development
14 Years Ago
by scott6480
…;i:\\c++\\register.txt"); //********************************** Function Prototypes void
initalize
(cashregister menu[26], cashregister order[26],double &amount…0; } // end of main function //********************************** Function Definitions void
initalize
(cashregister menu[26], cashregister order[26], double &amount, double…
Proliant DL760 hot-pluggable storage.
Hardware and Software
Hardware
18 Years Ago
by tanz0
… drive bought seperately, the Smart Array 5300 Controller tries to
initalize
it for about a minute, and then gives the message…. The time it takes for the drive to fail to
initalize
is not consistent however, and sometimes it does initialize, but…
Dynamic Memory 2d Array
Programming
Software Development
14 Years Ago
by scott6480
… success [CODE]for (int j=0;j<5;j++) //
initalize
array elements to sum of row and column { for (int…;<endl; for (int j=0;j<5;j++) //
initalize
array elements to sum of row and column { for (int…
GUI components are too large/Reading text from a file
Programming
Software Development
13 Years Ago
by SashaC
…[] interestRates; private NumberFormat fmt = NumberFormat.getInstance(); public Week5_2(){ super();
initalize
(); } private void
initalize
(){ interestRates = loadInterestRates("loadtest.txt"); // set up the…
Calculation output is negative infinity
Programming
Software Development
13 Years Ago
by SashaC
…[] interestRates; private NumberFormat fmt = NumberFormat.getInstance(); public Week5_2(){ super();
initalize
(); } private void
initalize
(){ interestRates = loadInterestRates("loadtest.txt"); // set up the…
help dynamically array in class
Programming
Software Development
13 Years Ago
by knellgust
…) { if(p>0) { price=p; } else { price=0; } } void
Initalize
(Book *book, int size) { for(int i=0;i>… I make dynamically create in the main function?[/ICODE][CODE]
Initalize
(book,number); cout<<"Enter the keyword: "…
Fix error code
Programming
Software Development
13 Years Ago
by knellgust
…>0) { price=p; } else { price=0; } }[/CODE][CODE]void
Initalize
(Book *book, int size) { for(int i=0;i>…>> number; Book *book=0; book=new Book[number];
Initalize
(book,number); cout<<"Enter the keyword: "…
Can I shorten this code?
Programming
Software Development
12 Years Ago
by Desi991
… ecx (max loop value) by 1 130 mov esi,0 ;
initalize
esi 131 mov edi,0 132 133 L2: 134 mov… ecx (max loop value) by 1 156 mov esi,0 ;
initalize
esi 157 mov edi,0 158 159 L2: 160 mov…
1
2
3
7
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC